Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- RuntimeError Traceback (most recent call last)
- <ipython-input-38-32e1a80e12b8> in <module>()
- 16 optimiser.zero_grad()
- 17
- ---> 18 logps = model(images)
- 19 loss = criterion(logps, labels)
- 20
- /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
- 487 if isinstance(var, dict):
- 488 var = next((v for v in var.values() if isinstance(v, torch.Tensor)))
- --> 489 else:
- 490 var = var[0]
- 491 grad_fn = var.grad_fn
- /usr/local/lib/python3.6/dist-packages/torchvision/models/resnet.py in forward(self, x)
- 149 x = self.avgpool(x)
- 150 x = x.view(x.size(0), -1)
- --> 151 x = self.fc(x)
- 152
- 153 return x
- /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
- 487 if isinstance(var, dict):
- 488 var = next((v for v in var.values() if isinstance(v, torch.Tensor)))
- --> 489 else:
- 490 var = var[0]
- 491 grad_fn = var.grad_fn
- /usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py in forward(self, input)
- 90 for module in self._modules.values():
- 91 input = module(input)
- ---> 92 return input
- 93
- 94
- /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs)
- 487 if isinstance(var, dict):
- 488 var = next((v for v in var.values() if isinstance(v, torch.Tensor)))
- --> 489 else:
- 490 var = var[0]
- 491 grad_fn = var.grad_fn
- /usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py in forward(self, input)
- 65 :math:`y = x_1 A x_2 + b`
- 66
- ---> 67 Args:
- 68 in1_features: size of each first input sample
- 69 in2_features: size of each second input sample
- /usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
- 1350
- 1351 # loss
- -> 1352
- 1353
- 1354 def nll_loss(input, target, weight=None, size_average=None, ignore_index=-100,
- RuntimeError: size mismatch, m1: [64 x 8192], m2: [2048 x 768] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:266
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement