Unverified Commit 75077328 authored by Vishwak Srinivasan's avatar Vishwak Srinivasan Committed by GitHub
Browse files

Avoid initializing weights when loading pretrained model for Inception (#2211)

parent c1da4a58
...@@ -48,6 +48,7 @@ def inception_v3(pretrained=False, progress=True, **kwargs): ...@@ -48,6 +48,7 @@ def inception_v3(pretrained=False, progress=True, **kwargs):
kwargs['aux_logits'] = True kwargs['aux_logits'] = True
else: else:
original_aux_logits = True original_aux_logits = True
kwargs['init_weights'] = False # we are loading weights from a pretrained model
model = Inception3(**kwargs) model = Inception3(**kwargs)
state_dict = load_state_dict_from_url(model_urls['inception_v3_google'], state_dict = load_state_dict_from_url(model_urls['inception_v3_google'],
progress=progress) progress=progress)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment