Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x73728 and 25088x12544) #14

Open
wqlcaq opened this issue Sep 27, 2024 · 0 comments

Comments

@wqlcaq
Copy link

wqlcaq commented Sep 27, 2024

python train.py --d ./data/data --m vae -e 30 -t y (erro)
Why does this error occur when running this instruction, but not when using another instruction (python train.py --d ./data/data --m ed -e 30 -t y -b 16)? This is an error that occurred during my training on ff+. May I ask if training the model for 30 epochs can achieve the effect mentioned in the article. Hope to receive a reply as soon as possible

python train.py --d ./data/data --m vae -e 30 -t y
Loading data...
Done.
/root/miniconda3/envs/GenConViT-main/lib/python3.8/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "train.py", line 208, in
main()
File "train.py", line 202, in main
train_model(path, mod, epoch, pretrained_model_filename, test_model, batch_size)
File "train.py", line 72, in train_model
train_loss, train_acc, epoch_loss = train(
File "/root/autodl-tmp/GenConViT-main/GenConViT-main/train/train_vae.py", line 22, in train
output, recons = model(images)
File "/root/miniconda3/envs/GenConViT-main/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/autodl-tmp/GenConViT-main/GenConViT-main/model/genconvit_vae.py", line 108, in forward
z = self.encoder(x)
File "/root/miniconda3/envs/GenConViT-main/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/autodl-tmp/GenConViT-main/GenConViT-main/model/genconvit_vae.py", line 55, in forward
mu = self.mu(x)
File "/root/miniconda3/envs/GenConViT-main/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/envs/GenConViT-main/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x73728 and 25088x12544)

@wqlcaq wqlcaq closed this as completed Sep 27, 2024
@wqlcaq wqlcaq reopened this Sep 27, 2024
@wqlcaq wqlcaq changed the title error RuntimeError: mat1 and mat2 shapes cannot be multiplied (32x73728 and 25088x12544) Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant