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
2686e1a3
Unverified
Commit
2686e1a3
authored
Apr 05, 2019
by
Francisco Massa
Committed by
GitHub
Apr 05, 2019
Browse files
Fix lint (#837)
parent
9abf0a34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
torchvision/models/googlenet.py
torchvision/models/googlenet.py
+2
-1
torchvision/models/resnet.py
torchvision/models/resnet.py
+5
-5
No files found.
torchvision/models/googlenet.py
View file @
2686e1a3
...
...
@@ -32,7 +32,8 @@ def googlenet(pretrained=False, **kwargs):
if
'aux_logits'
not
in
kwargs
:
kwargs
[
'aux_logits'
]
=
False
if
kwargs
[
'aux_logits'
]:
warnings
.
warn
(
'auxiliary heads in the pretrained googlenet model are NOT pretrained, so make sure to train them'
)
warnings
.
warn
(
'auxiliary heads in the pretrained googlenet model are NOT pretrained, '
'so make sure to train them'
)
original_aux_logits
=
kwargs
[
'aux_logits'
]
kwargs
[
'aux_logits'
]
=
True
kwargs
[
'init_weights'
]
=
False
...
...
torchvision/models/resnet.py
View file @
2686e1a3
...
...
@@ -107,7 +107,7 @@ class Bottleneck(nn.Module):
class
ResNet
(
nn
.
Module
):
def
__init__
(
self
,
block
,
layers
,
num_classes
=
1000
,
zero_init_residual
=
False
,
groups
=
1
,
width_per_group
=
64
,
norm_layer
=
None
):
groups
=
1
,
width_per_group
=
64
,
norm_layer
=
None
):
super
(
ResNet
,
self
).
__init__
()
if
norm_layer
is
None
:
norm_layer
=
nn
.
BatchNorm2d
...
...
@@ -240,13 +240,13 @@ def resnet152(pretrained=False, **kwargs):
def
resnext50_32x4d
(
pretrained
=
False
,
**
kwargs
):
model
=
ResNet
(
Bottleneck
,
[
3
,
4
,
6
,
3
],
groups
=
4
,
width_per_group
=
32
,
**
kwargs
)
#if pretrained:
#
if pretrained:
# model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))
return
model
def
resnext101_32x8d
(
pretrained
=
False
,
**
kwargs
):
model
=
ResNet
(
Bottleneck
,
[
3
,
4
,
23
,
3
],
groups
=
8
,
width_per_group
=
32
,
**
kwargs
)
#if pretrained:
#
if pretrained:
# model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))
return
model
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