refine leaky_relu docs (#26558)

test_feature_precision_test_c
zhupengyang 5 years ago committed by GitHub
parent 66596bd20f
commit 81c127d4ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -419,7 +419,7 @@ def leaky_relu(x, negative_slope=0.01, name=None):
paddle.disable_static()
x = paddle.to_tensor(np.array([-2, 0, 1]))
x = paddle.to_tensor(np.array([-2, 0, 1], 'float32'))
out = F.leaky_relu(x) # [-0.02, 0., 1.]
"""

@ -625,7 +625,7 @@ class LeakyReLU(layers.Layer):
paddle.disable_static()
m = paddle.nn.LeakyReLU()
x = paddle.to_tensor(np.array([-2, 0, 1]))
x = paddle.to_tensor(np.array([-2, 0, 1], 'float32'))
out = m(x) # [-0.02, 0., 1.]
"""

Loading…
Cancel
Save