未验证 提交 21138eb1 编写于 作者: S Shuai Yuan 提交者: GitHub

[DOC][PYTHON] Fix api comment of paddle.fluid.clip.GradientClipByValue (#17530)

* BugFix: fix api comment of paddle.fluid.clip.GradientClipByValue
* test=develop, test=document_preview
上级 6724a652
......@@ -134,12 +134,13 @@ class GradientClipByValue(BaseGradientClipAttr):
Examples:
.. code-block:: python
import paddle.fluid as fluid
w_param_attrs = fluid.ParamAttr(name=None,
initializer=fluid.initializer.UniformInitializer(low=-1.0, high=1.0, seed=0),
learning_rate=1.0,
regularizer=fluid.regularizer.L1Decay(1.0),
trainable=True,
clip=fluid.clip.GradientClipByValue(-1.0, 1.0))
clip=fluid.clip.GradientClipByValue(1.0, -1.0))
y_predict = fluid.layers.fc(input=x, size=1, param_attr=w_param_attrs)
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册