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: size mismatch, m1: [64 x 640], m2: [1792 x 1792] at /opt/conda/conda-bld/pytorch_1550813258230/work/aten/src/THC/generic/THCTensorMathBlas.cu:266 #27

Closed
LotusWhu opened this issue Sep 18, 2020 · 0 comments

Comments

@LotusWhu
Copy link

Hello, I am trying to use this with my custom dataset. And I get a mismatch of tensors while training the network.

Traceback (most recent call last):
File "train_lidar.py", line 212, in
main()
File "train_lidar.py", line 181, in main
train(args, model, ad_net, random_layer, train_loader, train_loader1, optimizer, optimizer_ad, epoch, 0, args.method)
File "train_lidar.py", line 84, in train
loss += loss_func.CDAN([feature, softmax_output], ad_net, None, None, random_layer)
File "/home/acharyad/Documents/CDAN/pytorch/loss.py", line 27, in CDAN
ad_out = ad_net(op_out.view(-1, softmax_output.size(1) * feature.size(1)))
File "/home/acharyad/anaconda2/envs/xynet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/acharyad/Documents/CDAN/pytorch/network.py", line 420, in forward
x = self.ad_layer1(x)
File "/home/acharyad/anaconda2/envs/xynet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/acharyad/anaconda2/envs/xynet/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 67, in forward
return F.linear(input, self.weight, self.bias)
File "/home/acharyad/anaconda2/envs/xynet/lib/python3.7/site-packages/torch/nn/functional.py", line 1352, in linear
ret = torch.addmm(torch.jit._unwrap_optional(bias), input, weight.t())
RuntimeError: size mismatch, m1: [64 x 640], m2: [1792 x 1792] at /opt/conda/conda-bld/pytorch_1550813258230/work/aten/src/THC/generic/THCTensorMathBlas.cu:266
(xynet) acharyad@acharyad-G752VY:~/Documents/CDAN/pytorch$

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