Resnet152 size mismatch error

hi, I am trying to use resnet152 and stuck in the error in FC layer. I am unable to understand it right now.
error is
size mismatch, m1: [1 x 32768], m2: [2048 x 1000] at c:\programdata\miniconda3\conda-bld\pytorch_1533094653504\work\aten\src\th\generic/THTensorMath.cpp:2070
Pytorch version: 0.4.1
Torchvision: ‘0.2.1’

To reproduce:

import torch
from torchvision import models
import torch.nn as nn
import numpy as np
model = models.resnet152()#pretrained=True)
tst = torch.rand(1,3,299,299)

output = model(tst)

Since you are hitting an error in FC layer, the problem is in the input size, could you change the input sizes to (1,3,224,224) or (1,3,229,229) ?

Thanks it worked but I thought pytorch updated its model to accept any input size, which i have used as well in previous examples.