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
fba4f42e
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "bce9105ac79636f68dcfdcfc9481b89533db65e5"
Unverified
Commit
fba4f42e
authored
Oct 15, 2021
by
Kai Zhang
Committed by
GitHub
Oct 15, 2021
Browse files
allow to use custom norm_layer (#4621)
parent
54a4550b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torchvision/models/regnet.py
torchvision/models/regnet.py
+2
-1
No files found.
torchvision/models/regnet.py
View file @
fba4f42e
...
@@ -392,7 +392,8 @@ class RegNet(nn.Module):
...
@@ -392,7 +392,8 @@ class RegNet(nn.Module):
def
_regnet
(
arch
:
str
,
block_params
:
BlockParams
,
pretrained
:
bool
,
progress
:
bool
,
**
kwargs
:
Any
)
->
RegNet
:
def
_regnet
(
arch
:
str
,
block_params
:
BlockParams
,
pretrained
:
bool
,
progress
:
bool
,
**
kwargs
:
Any
)
->
RegNet
:
model
=
RegNet
(
block_params
,
norm_layer
=
partial
(
nn
.
BatchNorm2d
,
eps
=
1e-05
,
momentum
=
0.1
),
**
kwargs
)
norm_layer
=
kwargs
.
pop
(
"norm_layer"
,
partial
(
nn
.
BatchNorm2d
,
eps
=
1e-05
,
momentum
=
0.1
))
model
=
RegNet
(
block_params
,
norm_layer
=
norm_layer
,
**
kwargs
)
if
pretrained
:
if
pretrained
:
if
arch
not
in
model_urls
:
if
arch
not
in
model_urls
:
raise
ValueError
(
f
"No checkpoint is available for model type
{
arch
}
"
)
raise
ValueError
(
f
"No checkpoint is available for model type
{
arch
}
"
)
...
...
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