PyTorch-VAE icon indicating copy to clipboard operation
PyTorch-VAE copied to clipboard

Why the model can only train on size of [64, 64]?

Open ohhh-yang opened this issue 6 months ago • 0 comments

When I try a size not equal to [64, 64], it comes below fault: File "/home/PyTorch-VAE/models/vanilla_vae.py", line 122, in forward mu, log_var = self.encode(input) File "/home/PyTorch-VAE/models/vanilla_vae.py", line 91, in encode mu = self.fc_mu(result) File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/torch/nn/modules/linear.py", line 94, in forward return F.linear(input, self.weight, self.bias) File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/torch/nn/functional.py", line 1753, in linear return torch._C._nn.linear(input, weight, bias) RuntimeError: mat1 dim 1 must match mat2 dim 0

ohhh-yang avatar Aug 16 '24 11:08 ohhh-yang