From 21138eb12a69d3b7c7310b993ce05787de9f0af0 Mon Sep 17 00:00:00 2001 From: Shuai Yuan Date: Fri, 24 May 2019 19:55:48 +0800 Subject: [PATCH] [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 --- python/paddle/fluid/clip.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/clip.py b/python/paddle/fluid/clip.py index 0f7dd531b3e..4a03a311c36 100644 --- a/python/paddle/fluid/clip.py +++ b/python/paddle/fluid/clip.py @@ -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) """ -- GitLab