How to get the input size of the pretrained model in torchvision.models

Hi, guys!
I met a problem today. I wanted to used the pretrained model resnet18 in torchvision.models to solve my problem and the size of the input image is 28x28. So I am wondering whether I need to resize my input image before I send the input into the resnet18.
Any suggestion will be appreciated!

torchvision resnet18 has an averagepool layer at the end. So the input size does not matter much provided the feature map size is greater than kernel size.

You can use 28x28 images.

1 Like

OK, I get it.
Thank sincerely for your answer and explanation!