Skip to content

Commit

Permalink
test=develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ysh329 committed Sep 30, 2020
1 parent 2adabb5 commit 005c81f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/paddle/fluid/layers/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12421,6 +12421,9 @@ def clip_by_norm(x, max_norm, name=None):
reward = paddle.nn.clip_by_norm(x=input, max_norm=1.0)
"""

if in_dygraph_mode():
return core.ops.clip_by_norm(x, 'max_norm', max_norm)

helper = LayerHelper("clip_by_norm", **locals())
check_variable_and_dtype(x, 'X', ['float32'], 'clip_by_norm')
check_type(max_norm, 'max_norm', (float), 'clip_by_norm')
Expand Down

0 comments on commit 005c81f

Please sign in to comment.