Open Qrrrr opened 3 years ago
Yes, new torch version use torchvision 0.10.0 but the resnet101 in torchvision 0.3.0 is different from resnet101 in the new torchvision so it is actually the pretrained problem, you can change the line 54 in file models.py from nn.MaxPool2d(14, 14) to nn.MaxPool2d(7,7) and re-train it or it works quite well even with the provided author's pretrained model. A more complicated way in case you need to work with a new pytorch version but you want the behaviour from the old torchvision version is that you downgrade pytorch to 1.1.0 download the pretrained resnet101 and upgrade pytorch again and use the downloaded model. Sorry for my English.
I just followed the instruction of 'ReadMe', and run demo.py. But there comes an error: 'given input size(2048,7,7), calculate output size(2048,0,0), output is too small.' I change the size parameter from (224,224) to (512,512) and the program can finally run. So I want to ask what the proper size for the input image should be? Or are there any other solution to solve this error?