Skip to content

Update inception quantized model path #1969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions torchvision/models/quantization/inception.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
quant_model_urls = {
# fp32 weights ported from TensorFlow, quantized in PyTorch
"inception_v3_google_fbgemm":
"https://download.pytorch.org/models/quantized/inception_v3_google_fbgemm-4f6e4894.pth"
"https://download.pytorch.org/models/quantized/inception_v3_google_fbgemm-71447a44.pth"
}


Expand Down Expand Up @@ -65,6 +65,9 @@ def inception_v3(pretrained=False, progress=True, quantize=False, **kwargs):

if pretrained:
if quantize:
if not original_aux_logits:
model.aux_logits = False
del model.AuxLogits
model_url = quant_model_urls['inception_v3_google' + '_' + backend]
else:
model_url = inception_module.model_urls['inception_v3_google']
Expand All @@ -74,9 +77,10 @@ def inception_v3(pretrained=False, progress=True, quantize=False, **kwargs):

model.load_state_dict(state_dict)

if not original_aux_logits:
model.aux_logits = False
del model.AuxLogits
if not quantize:
if not original_aux_logits:
model.aux_logits = False
del model.AuxLogits
return model


Expand Down