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
ModelZoo
SOLOv2-pytorch
Commits
78529eca
Commit
78529eca
authored
Jan 22, 2020
by
Whi Kwon
Committed by
Kai Chen
Jan 22, 2020
Browse files
Fix typo activatation -> activation (#2007)
parent
b5d62ef9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mmdet/models/utils/conv_module.py
mmdet/models/utils/conv_module.py
+3
-3
No files found.
mmdet/models/utils/conv_module.py
View file @
78529eca
...
@@ -93,7 +93,7 @@ class ConvModule(nn.Module):
...
@@ -93,7 +93,7 @@ class ConvModule(nn.Module):
assert
set
(
order
)
==
set
([
'conv'
,
'norm'
,
'act'
])
assert
set
(
order
)
==
set
([
'conv'
,
'norm'
,
'act'
])
self
.
with_norm
=
norm_cfg
is
not
None
self
.
with_norm
=
norm_cfg
is
not
None
self
.
with_activat
at
ion
=
activation
is
not
None
self
.
with_activation
=
activation
is
not
None
# if the conv layer is before a norm layer, bias is unnecessary.
# if the conv layer is before a norm layer, bias is unnecessary.
if
bias
==
'auto'
:
if
bias
==
'auto'
:
bias
=
False
if
self
.
with_norm
else
True
bias
=
False
if
self
.
with_norm
else
True
...
@@ -135,7 +135,7 @@ class ConvModule(nn.Module):
...
@@ -135,7 +135,7 @@ class ConvModule(nn.Module):
self
.
add_module
(
self
.
norm_name
,
norm
)
self
.
add_module
(
self
.
norm_name
,
norm
)
# build activation layer
# build activation layer
if
self
.
with_activat
at
ion
:
if
self
.
with_activation
:
# TODO: introduce `act_cfg` and supports more activation layers
# TODO: introduce `act_cfg` and supports more activation layers
if
self
.
activation
not
in
[
'relu'
]:
if
self
.
activation
not
in
[
'relu'
]:
raise
ValueError
(
'{} is currently not supported.'
.
format
(
raise
ValueError
(
'{} is currently not supported.'
.
format
(
...
@@ -162,6 +162,6 @@ class ConvModule(nn.Module):
...
@@ -162,6 +162,6 @@ class ConvModule(nn.Module):
x
=
self
.
conv
(
x
)
x
=
self
.
conv
(
x
)
elif
layer
==
'norm'
and
norm
and
self
.
with_norm
:
elif
layer
==
'norm'
and
norm
and
self
.
with_norm
:
x
=
self
.
norm
(
x
)
x
=
self
.
norm
(
x
)
elif
layer
==
'act'
and
activate
and
self
.
with_activat
at
ion
:
elif
layer
==
'act'
and
activate
and
self
.
with_activation
:
x
=
self
.
activate
(
x
)
x
=
self
.
activate
(
x
)
return
x
return
x
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