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
4e5c40b5
Unverified
Commit
4e5c40b5
authored
2 years ago
by
Zhengfei-0311
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Doc]: Update config.md (#562)
* Update config.md * Update config.md
parent
a5eb1791
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/zh_cn/tutorials/config.md
+3
-3
3 additions, 3 deletions
docs/zh_cn/tutorials/config.md
with
3 additions
and
3 deletions
docs/zh_cn/tutorials/config.md
+
3
−
3
View file @
4e5c40b5
...
@@ -113,7 +113,7 @@ optimizer = dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)
...
@@ -113,7 +113,7 @@ optimizer = dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001)
然后在算法库中可以通过如下代码构造优化器对象。
然后在算法库中可以通过如下代码构造优化器对象。
```
python
```
python
from
mmengine
import
Config
from
mmengine
import
Config
,
optim
from
mmengine.registry
import
OPTIMIZERS
from
mmengine.registry
import
OPTIMIZERS
import
torch.nn
as
nn
import
torch.nn
as
nn
...
@@ -573,7 +573,7 @@ MMEngine 还提供了 `get_config` 和 `get_model` 两个接口,支持对符
...
@@ -573,7 +573,7 @@ MMEngine 还提供了 `get_config` 和 `get_model` 两个接口,支持对符
用户可以通过指定
`pretrained=True`
获得已经加载预训练权重的模型以进行训练或者推理。
用户可以通过指定
`pretrained=True`
获得已经加载预训练权重的模型以进行训练或者推理。
```
python
```
python
from
mmengine
import
get_model
from
mmengine
.hub
import
get_model
model
=
get_model
(
model
=
get_model
(
'
mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
'
,
pretrained
=
True
)
'
mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
'
,
pretrained
=
True
)
...
@@ -590,7 +590,7 @@ http loads checkpoint from path: https://download.openmmlab.com/mmdetection/v2.0
...
@@ -590,7 +590,7 @@ http loads checkpoint from path: https://download.openmmlab.com/mmdetection/v2.0
同时,如果用户指定
`pretrained=True`
,得到的配置文件中会新增
`model_path`
字段,指定了对应模型预训练权重的路径。
同时,如果用户指定
`pretrained=True`
,得到的配置文件中会新增
`model_path`
字段,指定了对应模型预训练权重的路径。
```
python
```
python
from
mmengine
import
get_config
from
mmengine
.hub
import
get_config
cfg
=
get_config
(
cfg
=
get_config
(
'
mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
'
,
pretrained
=
True
)
'
mmdet::faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
'
,
pretrained
=
True
)
...
...
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