RuntimeError                              Traceback (most recent call last)
 in ()
7         # Forward + Backward + Optimize
8         optimizer.zero_grad()
----> 9         outputs = model(images)
10         loss = criterion(outputs, labels)
11         loss.backward()
~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
475             result = self._slow_forward(*input, **kwargs)
476         else:
–> 477             result = self.forward(*input, **kwargs)
478         for hook in self._forward_hooks.values():
479             hook_result = hook(self, input, result)
 in forward(self, x)
13         out = self.Maxpool(self.relu(self.cov2(out)))
14         out = out.view(n_size,-1)
—> 15         out = self.fc(out)
16
17         return out
~\Anaconda3\lib\site-packages\torch\nn\modules\module.py in call(self, *input, **kwargs)
475             result = self._slow_forward(*input, **kwargs)
476         else:
–> 477             result = self.forward(*input, **kwargs)
478         for hook in self._forward_hooks.values():
479             hook_result = hook(self, input, result)
~\Anaconda3\lib\site-packages\torch\nn\modules\linear.py in forward(self, input)
53
54     def forward(self, input):
—> 55         return F.linear(input, self.weight, self.bias)
56
57     def extra_repr(self):
~\Anaconda3\lib\site-packages\torch\nn\functional.py in linear(input, weight, bias)
1022     if input.dim() == 2 and bias is not None:
1023         # fused op is marginally faster
-> 1024         return torch.addmm(bias, input, weight.t())
1025
1026     output = input.matmul(weight.t())
RuntimeError: size mismatch, m1: [100 x 512], m2: [1568 x 10] at c:\programdata\miniconda3\conda-bld\pytorch_1532504087133\work\aten\src\th\generic/THTensorMath.cpp:2070