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
c89156ba
"src/vscode:/vscode.git/clone" did not exist on "08edcfbb0baa05103c1a451a2c16c52c11bd6529"
Unverified
Commit
c89156ba
authored
Apr 09, 2020
by
Luan Pham
Committed by
GitHub
Apr 09, 2020
Browse files
Make norm layer as parameters in models.detection.backbone_utils.py (#2081)
parent
684f48db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/models/detection/backbone_utils.py
torchvision/models/detection/backbone_utils.py
+2
-2
No files found.
torchvision/models/detection/backbone_utils.py
View file @
c89156ba
...
...
@@ -41,10 +41,10 @@ class BackboneWithFPN(nn.Module):
return
x
def
resnet_fpn_backbone
(
backbone_name
,
pretrained
):
def
resnet_fpn_backbone
(
backbone_name
,
pretrained
,
norm_layer
=
misc_nn_ops
.
FrozenBatchNorm2d
):
backbone
=
resnet
.
__dict__
[
backbone_name
](
pretrained
=
pretrained
,
norm_layer
=
misc_nn_ops
.
FrozenBatchNorm2d
)
norm_layer
=
norm_layer
)
# freeze layers
for
name
,
parameter
in
backbone
.
named_parameters
():
if
'layer2'
not
in
name
and
'layer3'
not
in
name
and
'layer4'
not
in
name
:
...
...
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