Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mmsegmentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Bartels
mmsegmentation
Commits
13b108db
Commit
13b108db
authored
2 years ago
by
谢昕辰
Committed by
MeowZheng
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Enhancement] Support custom runner (#1923)
* support custom runner * fix
parent
45b63c58
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/train.py
+8
-1
8 additions, 1 deletion
tools/train.py
with
8 additions
and
1 deletion
tools/train.py
+
8
−
1
View file @
13b108db
...
@@ -6,6 +6,7 @@ import os.path as osp
...
@@ -6,6 +6,7 @@ import os.path as osp
from
mmengine.config
import
Config
,
DictAction
from
mmengine.config
import
Config
,
DictAction
from
mmengine.logging
import
print_log
from
mmengine.logging
import
print_log
from
mmengine.registry
import
RUNNERS
from
mmengine.runner
import
Runner
from
mmengine.runner
import
Runner
from
mmseg.utils
import
register_all_modules
from
mmseg.utils
import
register_all_modules
...
@@ -97,7 +98,13 @@ def main():
...
@@ -97,7 +98,13 @@ def main():
cfg
.
load_from
=
args
.
resume
cfg
.
load_from
=
args
.
resume
# build the runner from config
# build the runner from config
runner
=
Runner
.
from_cfg
(
cfg
)
if
'
runner_type
'
not
in
cfg
:
# build the default runner
runner
=
Runner
.
from_cfg
(
cfg
)
else
:
# build customized runner from the registry
# if 'runner_type' is set in the cfg
runner
=
RUNNERS
.
build
(
cfg
)
# start training
# start training
runner
.
train
()
runner
.
train
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment