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
fb23980e
Unverified
Commit
fb23980e
authored
Jan 16, 2023
by
Xiang Xu
Committed by
GitHub
Jan 16, 2023
Browse files
[Fix] Fix conflict of resume argument (#2224)
* fix `resume` error * fix
parent
341ff998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
tools/train.py
tools/train.py
+14
-3
No files found.
tools/train.py
View file @
fb23980e
...
...
@@ -27,8 +27,12 @@ def parse_args():
help
=
'enable automatically scaling LR.'
)
parser
.
add_argument
(
'--resume'
,
action
=
'store_true'
,
help
=
'resume from the latest checkpoint in the work_dir automatically'
)
nargs
=
'?'
,
type
=
str
,
const
=
'auto'
,
help
=
'If specify checkpoint path, resume from it, while if not '
'specify, try to auto resume from the latest checkpoint '
'in the work directory.'
)
parser
.
add_argument
(
'--ceph'
,
action
=
'store_true'
,
help
=
'Use ceph as data storage backend'
)
parser
.
add_argument
(
...
...
@@ -105,7 +109,14 @@ def main():
'"auto_scale_lr.enable" or '
'"auto_scale_lr.base_batch_size" in your'
' configuration file.'
)
cfg
.
resume
=
args
.
resume
# resume is determined in this priority: resume from > auto_resume
if
args
.
resume
==
'auto'
:
cfg
.
resume
=
True
cfg
.
load_from
=
None
elif
args
.
resume
is
not
None
:
cfg
.
resume
=
True
cfg
.
load_from
=
args
.
resume
# build the runner from config
if
'runner_type'
not
in
cfg
:
...
...
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