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

test_feature_precision_test_c
hong19860320 5 years ago committed by GitHub
parent 199b0c7c1b
commit 87843bebde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -665,7 +665,7 @@ def selu(x,
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]]
"""
if in_dygraph_mode():

@ -570,7 +570,7 @@ class SELU(layers.Layer):
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()
out = m(x) # [[0, 1.050701],[2.101402, 3.152103]]
"""

Loading…
Cancel
Save