How do I feed higher res images to model zoo models?
Can someone please explain what needs to be changed in following model definition to feed it 512x512 or 1024x1024 dimensions?  I am new from Keras and a bit lost here.  Thank you!
FuriouslyCurious
The size mismatch is coming from the output of the last avgpool layer feeding into the input of the resnet.fc module. To feed it larger images you will need to strip the existing fully connected layer and replace it with one with a larger input dimension. something like: <SCODE>your_net = models.resnet18(pretrained=True)`

new_num_features = *something bigger than 512*

your_net.fc = nn.Linear(new_num_features, 1000)
<ECODE> This will create untrained parameters, though. To use the pretrained models, I think you are restricted to image sizes below what you are using. this will show you the dimensions of the tensor that is created by whatever images you are using
tymokvo
FuriouslyCurious
Hello, The CNN models like resnet, vgg and alexnet in pytorch are pretrained on which dataset?
raaj043
Would you be willing to share your code to do that? Thanks
achaiah
macaodha
tymokvo
I’d like to train the Inceptionv3 model with high-resolution images like 512x512. Do you know how to do it?
hyy123