You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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$
The text was updated successfully, but these errors were encountered:
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$
The text was updated successfully, but these errors were encountered: