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
MMCV
Commits
edbbc0f2
Unverified
Commit
edbbc0f2
authored
Aug 06, 2020
by
Jintao Lin
Committed by
GitHub
Aug 06, 2020
Browse files
fix bug for self.warmup_iters when warmup_by_epoch (#470)
parent
6b43ae37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/runner/hooks/lr_updater.py
mmcv/runner/hooks/lr_updater.py
+2
-2
No files found.
mmcv/runner/hooks/lr_updater.py
View file @
edbbc0f2
...
...
@@ -110,11 +110,11 @@ class LrUpdaterHook(Hook):
group
[
'initial_lr'
]
for
group
in
runner
.
optimizer
.
param_groups
]
if
self
.
warmup_by_epoch
:
def
before_train_epoch
(
self
,
runner
):
if
self
.
warmup_iters
is
None
:
epoch_len
=
len
(
runner
.
data_loader
)
self
.
warmup_iters
=
self
.
warmup_epochs
*
epoch_len
def
before_train_epoch
(
self
,
runner
):
if
not
self
.
by_epoch
:
return
...
...
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