I make mistakes every time on this for
days, any comment would be helpful to me, thanks

s986×544 27.4 KB

RuntimeError                              Traceback (most recent call last)
 in ()
19 image_path = test_dir+’/dog/dog.1001.jpg’
20
—> 21 predict(image_path, model)
4 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
1845     if has_torch_function_variadic(input, weight):
1846         return handle_torch_function(linear, (input, weight), input, weight, bias=bias)
 → 1847     return torch._C._nn.linear(input, weight, bias)
1848
1849
RuntimeError: mat1 and mat2 shapes cannot be multiplied (672x224 and 25088x1012)