未验证 提交 81c127d4 编写于 作者: Z zhupengyang 提交者: GitHub

refine leaky_relu docs (#26558)

上级 66596bd2
......@@ -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.]
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册