Hi again, As you said I have to do adaptive pooling before sending it to the network.
So for example as VGG16 require input images to be of size 224X224X3, but we want to train on image on different size ( example 1024X1024X3)
Should the code look like this?
model = models.vgg16(pretrained=False)
first_layer = [nn.AdaptiveMaxPool2d((224,224))]
first_layer.extend(list(model.features))  
model.features= nn.Sequential(*first_layer )

Also now I have to freeze my model from 2nd layer, and I only need to train the 1st layer and the classification part, how to do that?