pretrained-models.pytorch icon indicating copy to clipboard operation
pretrained-models.pytorch copied to clipboard

couldnot use inception_resnetv2

Open dsd009 opened this issue 6 years ago • 1 comments

Traceback (most recent call last): File "clas_inc_res.py", line 299, in model_conv.classifier._modules["1"] = nn.Conv2d(512, num_of_output_classes, kernel_size=(1, 1)) File "/home/raman/anaconda2/envs/pyto3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 535, in getattr type(self).name, name)) AttributeError: 'InceptionResNetV2' object has no attribute 'classifier'

dsd009 avatar Mar 02 '19 03:03 dsd009

Hi, the API was changed in 12/02/2017 (see commit “Improve API”). You can change “classifier” into “logits”

PPPW avatar Mar 11 '19 18:03 PPPW