-
Notifications
You must be signed in to change notification settings - Fork 19
Error #1
Description
Hi! Thank you for your code. I got the error when I run your code. Can you help please to sort out the problem?
Traceback (most recent call last):
File "main.py", line 220, in
output = net(data)
File "/home/user/pytorch_python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 224, in call
result = self.forward(*input, **kwargs)
File "main.py", line 71, in forward
return self.net(input)
File "/home/user/pytorch_python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 224, in call
result = self.forward(*input, **kwargs)
File "/home/user/pytorch_python3/lib/python3.5/site-packages/torch/nn/modules/container.py", line 67, in forward
input = module(input)
File "/home/user/pytorch_python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 224, in call
result = self.forward(*input, **kwargs)
File "main.py", line 120, in forward
u_hat = torch.matmul(torch.cat([self.W] * self.batch_size, 0) , input)
File "/home/user/pytorch_python3/lib/python3.5/site-packages/torch/functional.py", line 214, in matmul
expand_batch_portion = torch._C._infer_size(tensor1_exp_size[:-2], tensor2_exp_size[:-2])
RuntimeError: The size of tensor a (50) must match the size of tensor b (100) at non-singleton dimension 0.