未验证 提交 9a475582 编写于 作者: Y ysh329 提交者: GitHub

fix clip by norm EN doc. test=develop (#28994)

* fix clip by norm eng doc. test=develop
上级 5b339262
...@@ -12368,7 +12368,7 @@ def clip_by_norm(x, max_norm, name=None): ...@@ -12368,7 +12368,7 @@ def clip_by_norm(x, max_norm, name=None):
None by default. None by default.
Returns: Returns:
Variable: Tensor:
out(${out_type}): ${out_comment} out(${out_type}): ${out_comment}
...@@ -12379,7 +12379,6 @@ def clip_by_norm(x, max_norm, name=None): ...@@ -12379,7 +12379,6 @@ def clip_by_norm(x, max_norm, name=None):
import paddle import paddle
import numpy as np import numpy as np
paddle.disable_static()
input = paddle.to_tensor(data=np.array([[0.1, 0.2], [0.3, 0.4]]), dtype="float32") input = paddle.to_tensor(data=np.array([[0.1, 0.2], [0.3, 0.4]]), dtype="float32")
reward = paddle.nn.clip_by_norm(x=input, max_norm=1.0) reward = paddle.nn.clip_by_norm(x=input, max_norm=1.0)
""" """
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册