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
mmdetection3d
Commits
1d76a7c0
Commit
1d76a7c0
authored
May 05, 2020
by
zhangwenwei
Browse files
Add momentum scheduler
parent
99397168
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mmdet3d/apis/train.py
mmdet3d/apis/train.py
+3
-2
No files found.
mmdet3d/apis/train.py
View file @
1d76a7c0
...
@@ -90,14 +90,15 @@ def train_detector(model,
...
@@ -90,14 +90,15 @@ def train_detector(model,
if
fp16_cfg
is
not
None
:
if
fp16_cfg
is
not
None
:
optimizer_config
=
Fp16OptimizerHook
(
optimizer_config
=
Fp16OptimizerHook
(
**
cfg
.
optimizer_config
,
**
fp16_cfg
,
distributed
=
distributed
)
**
cfg
.
optimizer_config
,
**
fp16_cfg
,
distributed
=
distributed
)
elif
distributed
:
elif
distributed
and
'type'
not
in
cfg
.
optimizer_config
:
optimizer_config
=
DistOptimizerHook
(
**
cfg
.
optimizer_config
)
optimizer_config
=
DistOptimizerHook
(
**
cfg
.
optimizer_config
)
else
:
else
:
optimizer_config
=
cfg
.
optimizer_config
optimizer_config
=
cfg
.
optimizer_config
# register hooks
# register hooks
runner
.
register_training_hooks
(
cfg
.
lr_config
,
optimizer_config
,
runner
.
register_training_hooks
(
cfg
.
lr_config
,
optimizer_config
,
cfg
.
checkpoint_config
,
cfg
.
log_config
)
cfg
.
checkpoint_config
,
cfg
.
log_config
,
cfg
.
get
(
'momentum_config'
,
None
))
if
distributed
:
if
distributed
:
runner
.
register_hook
(
DistSamplerSeedHook
())
runner
.
register_hook
(
DistSamplerSeedHook
())
...
...
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