Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
75077328
Unverified
Commit
75077328
authored
May 14, 2020
by
Vishwak Srinivasan
Committed by
GitHub
May 14, 2020
Browse files
Avoid initializing weights when loading pretrained model for Inception (#2211)
parent
c1da4a58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
torchvision/models/inception.py
torchvision/models/inception.py
+1
-0
No files found.
torchvision/models/inception.py
View file @
75077328
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment