未验证 提交 87843beb 编写于 作者: H hong19860320 提交者: GitHub

Fix the sample code of SELU/selu (#26565)

上级 199b0c7c
...@@ -665,7 +665,7 @@ def selu(x, ...@@ -665,7 +665,7 @@ def selu(x,
paddle.disable_static() paddle.disable_static()
x = paddle.to_tensor(np.array([[0, 1],[2, 3]])) x = paddle.to_tensor(np.array([[0.0, 1.0],[2.0, 3.0]]))
out = F.selu(x) # [[0, 1.050701],[2.101402, 3.152103]] out = F.selu(x) # [[0, 1.050701],[2.101402, 3.152103]]
""" """
if in_dygraph_mode(): if in_dygraph_mode():
......
...@@ -570,7 +570,7 @@ class SELU(layers.Layer): ...@@ -570,7 +570,7 @@ class SELU(layers.Layer):
paddle.disable_static() paddle.disable_static()
x = paddle.to_tensor(np.array([[0, 1],[2, 3]])) x = paddle.to_tensor(np.array([[0.0, 1.0],[2.0, 3.0]]))
m = paddle.nn.SELU() m = paddle.nn.SELU()
out = m(x) # [[0, 1.050701],[2.101402, 3.152103]] out = m(x) # [[0, 1.050701],[2.101402, 3.152103]]
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册