tonyngjichun / SOLAR

PyTorch code for "SOLAR: Second-Order Loss and Attention for Image Retrieval". In ECCV 2020
MIT License
172 stars 34 forks source link

vgg16 test #5

Open kruzel opened 3 years ago

kruzel commented 3 years ago

Hi, do you support vgg16 pretrained test? if yes how can I run it? what *.pth should I use?

parser.add_argument('--network', '-n', metavar='NETWORK', default='resnet101-solar-best.pth', help="network to be evaluated. " )

alternatively, can you explain how to train with vgg16? I tried setting --arch 'vgg16' but it fails in networks.py in init() in this line: last_feat_in = base_model.inplanes orch.nn.modules.module.ModuleAttributeError: 'VGG' object has no attribute 'inplanes'

Thanks

tonyngjichun commented 3 years ago

Hi, thanks for the question and apologies for the delayed response. In this work we focused on ResNet models at it was shown that ResNet consistently outperforms VGG in image retrieval benchmarks, hence the models were designed around ResNet. The base_model.inplanes is the feature size from the last feature maps, for ResNet101 this is 2048. For all VGG models, this number would be 512. Hope this helps!