Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICV-mmengine_basecode
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
Service Desk
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
Florian Schiffel
ICV-mmengine_basecode
Commits
d09af9ea
Unverified
Commit
d09af9ea
authored
2 years ago
by
Zaida Zhou
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Doc]: update root registries in docs (#316)
parent
45f5859b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/zh_cn/tutorials/registry.md
+8
-6
8 additions, 6 deletions
docs/zh_cn/tutorials/registry.md
mmengine/registry/root.py
+6
-7
6 additions, 7 deletions
mmengine/registry/root.py
with
14 additions
and
13 deletions
docs/zh_cn/tutorials/registry.md
+
8
−
6
View file @
d09af9ea
...
...
@@ -224,7 +224,7 @@ conv = MODELS.build(cfg)
MMEngine 的注册器支持跨项目调用,即可以在一个项目中使用另一个项目的模块。虽然跨项目调用也有其他方法的可以实现,但 MMEngine 注册器提供了更为简便的方法。
为了方便跨库调用,MMEngine 提供了
18
个根注册器:
为了方便跨库调用,MMEngine 提供了
20
个根注册器:
-
RUNNERS: Runner 的注册器
-
RUNNER_CONSTRUCTORS: Runner 的构造器
...
...
@@ -232,17 +232,19 @@ MMEngine 的注册器支持跨项目调用,即可以在一个项目中使用
-
HOOKS: 钩子,如
`CheckpointHook`
,
`ProfilerHook`
-
DATASETS: 数据集
-
DATA_SAMPLERS:
`Dataloader`
的
`sampler`
,用于采样数据
-
PIPELINE
S: 各种数据预处理,如
`Resize`
,
`Reshape`
-
TRANSFORM
S: 各种数据预处理,如
`Resize`
,
`Reshape`
-
MODELS: 模型的各种模块
-
MODEL_WRAPPERS: 模型的包装器,如
`MMDistributedDataParallel`
,用于对分布式数据并行
-
WEIGHT_INITIALIZERS: 权重初始化的工具
-
OPTIMIZERS: 注册了 PyTorch 中所有的
`optimizer`
以及自定义的
`optimizer`
-
OPTIMIZER_CONSTRUCTORS: optimizer 的构造器
-
PARAM_SCHEDULERS: 各种参数调度器, 如
`MultiStepLR`
-
METRICS: 用于验证模型精度的评估指标
-
OPTIM_WRAPPER: 对 Optimizer 相关操作的封装,如
`OptimWrapper`
,
`AmpOptimWrapper`
-
OPTIM_WRAPPER_CONSTRUCTORS: optimizer wrapper 的构造器
-
PARAM_SCHEDULERS: 各种参数调度器,如
`MultiStepLR`
-
METRICS: 用于计算模型精度的评估指标,如
`Accuracy`
-
EVALUATOR: 用于计算模型精度的一个或多个评估指标
-
TASK_UTILS: 任务强相关的一些组件,如
`AnchorGenerator`
,
`BboxCoder`
-
VISUALIZERS: 管理绘制模块,如
`DetVisualizer`
可在图片上绘制预测框
-
WRITER
S: 存储训练日志的后端,如
`Local
Writer
`
,
`Tensorboard
Writer
`
-
VISBACKEND
S: 存储训练日志的后端,如
`Local
VisBackend
`
,
`Tensorboard
VisBackend
`
-
LOG_PROCESSORS: 控制日志的统计窗口和统计方法,默认使用
`LogProcessor`
,如有特殊需求可自定义
`LogProcessor`
下面我们以 OpenMMLab 开源项目为例介绍如何跨项目调用模块。
...
...
This diff is collapsed.
Click to expand it.
mmengine/registry/root.py
+
6
−
7
View file @
d09af9ea
# Copyright (c) OpenMMLab. All rights reserved.
"""
MMEngine provides
11
root registries to support using modules across
"""
MMEngine provides
20
root registries to support using modules across
projects.
More datails can be found at
...
...
@@ -31,12 +31,17 @@ WEIGHT_INITIALIZERS = Registry('weight initializer')
# mangage all kinds of optimizers like `SGD` and `Adam`
OPTIMIZERS
=
Registry
(
'
optimizer
'
)
# manage optimizer wrapper
OPTIM_WRAPPERS
=
Registry
(
'
optim_wrapper
'
)
# manage constructors that customize the optimization hyperparameters.
OPTIM_WRAPPER_CONSTRUCTORS
=
Registry
(
'
optimizer wrapper constructor
'
)
# mangage all kinds of parameter schedulers like `MultiStepLR`
PARAM_SCHEDULERS
=
Registry
(
'
parameter scheduler
'
)
# manage all kinds of metrics
METRICS
=
Registry
(
'
metric
'
)
# manage evaluator
EVALUATOR
=
Registry
(
'
evaluator
'
)
# manage task-specific modules like anchor generators and box coders
TASK_UTILS
=
Registry
(
'
task util
'
)
...
...
@@ -48,9 +53,3 @@ VISBACKENDS = Registry('vis_backend')
# manage logprocessor
LOG_PROCESSORS
=
Registry
(
'
log_processor
'
)
# manage optimizer wrapper
OPTIM_WRAPPERS
=
Registry
(
'
optim_wrapper
'
)
# manage evaluator
EVALUATOR
=
Registry
(
'
evaluator
'
)
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