Skip to content
Snippets Groups Projects
Unverified Commit 1f63d243 authored by vansin's avatar vansin Committed by GitHub
Browse files

[Doc] delete the error comment in docs (#514)

parent 4e5c40b5
No related branches found
No related tags found
No related merge requests found
...@@ -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])
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment