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
1f63d243
Unverified
Commit
1f63d243
authored
2 years ago
by
vansin
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Doc] delete the error comment in docs (#514)
parent
4e5c40b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/zh_cn/tutorials/registry.md
+0
-6
0 additions, 6 deletions
docs/zh_cn/tutorials/registry.md
with
0 additions
and
6 deletions
docs/zh_cn/tutorials/registry.md
+
0
−
6
View file @
1f63d243
...
@@ -92,7 +92,6 @@ activation = ACTIVATION.build(act_cfg)
...
@@ -92,7 +92,6 @@ activation = ACTIVATION.build(act_cfg)
output
=
activation
(
input
)
output
=
activation
(
input
)
# call Sigmoid.forward
# call Sigmoid.forward
print
(
output
)
print
(
output
)
# tensor([0.0159, 0.0815])
```
```
如果我们想使用
`ReLU`
,仅需修改配置。
如果我们想使用
`ReLU`
,仅需修改配置。
...
@@ -103,7 +102,6 @@ activation = ACTIVATION.build(act_cfg)
...
@@ -103,7 +102,6 @@ activation = ACTIVATION.build(act_cfg)
output
=
activation
(
input
)
output
=
activation
(
input
)
# call Sigmoid.forward
# call Sigmoid.forward
print
(
output
)
print
(
output
)
# tensor([0.0159, 0.0815])
```
```
如果我们希望在创建实例前检查输入参数的类型(或者任何其他操作),我们可以实现一个构建方法并将其传递给注册器从而实现自定义构建流程。
如果我们希望在创建实例前检查输入参数的类型(或者任何其他操作),我们可以实现一个构建方法并将其传递给注册器从而实现自定义构建流程。
...
@@ -141,7 +139,6 @@ output = activation(input)
...
@@ -141,7 +139,6 @@ output = activation(input)
# build activation: Tanh
# build activation: Tanh
# call Tanh.forward
# call Tanh.forward
print
(
output
)
print
(
output
)
# tensor([0.0159, 0.0815])
```
```
```
{note}
```
{note}
...
@@ -262,7 +259,6 @@ input = torch.randn(2)
...
@@ -262,7 +259,6 @@ input = torch.randn(2)
output
=
model
(
input
)
output
=
model
(
input
)
# call RReLU.forward
# call RReLU.forward
print
(
output
)
print
(
output
)
# tensor([-1.5774, -0.5850])
```
```
### 调用兄弟节点的模块
### 调用兄弟节点的模块
...
@@ -289,7 +285,6 @@ model = MODELS.build(cfg=dict(type='mmalpha.LogSoftmax'))
...
@@ -289,7 +285,6 @@ model = MODELS.build(cfg=dict(type='mmalpha.LogSoftmax'))
output
=
model
(
input
)
output
=
model
(
input
)
# call LogSoftmax.forward
# call LogSoftmax.forward
print
(
output
)
print
(
output
)
# tensor([-1.5774, -0.5850])
```
```
调用兄弟节点的模块需要在
`type`
中指定
`scope`
前缀,所以上面的配置需要加前缀
`mmalpha`
。
调用兄弟节点的模块需要在
`type`
中指定
`scope`
前缀,所以上面的配置需要加前缀
`mmalpha`
。
...
@@ -303,5 +298,4 @@ model = MODELS.build(cfg=dict(type='LogSoftmax', _scope_='mmalpha'))
...
@@ -303,5 +298,4 @@ model = MODELS.build(cfg=dict(type='LogSoftmax', _scope_='mmalpha'))
output
=
model
(
input
)
output
=
model
(
input
)
# call LogSoftmax.forward
# call LogSoftmax.forward
print
(
output
)
print
(
output
)
# tensor([-1.5774, -0.5850])
```
```
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