Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhupengyang committed Nov 16, 2020
1 parent bf4759f commit c097b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/paddle/fluid/layers/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -9731,7 +9731,7 @@ def swish(x, beta=1.0, name=None):
return out


@deprecated(since="2.0.0", update_to="paddle.nn.functional.prelu")
@deprecated(since="2.0.0", update_to="paddle.static.nn.prelu")
def prelu(x, mode, param_attr=None, name=None):
"""
prelu activation.
Expand Down
4 changes: 2 additions & 2 deletions python/paddle/tensor/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def ones_like(x, dtype=None, name=None):
import paddle
x = paddle.to_tensor([1,2,3])
out1 = paddle.zeros_like(x) # [1., 1., 1.]
out2 = paddle.zeros_like(x, dtype='int32') # [1, 1, 1]
out1 = paddle.ones_like(x) # [1., 1., 1.]
out2 = paddle.ones_like(x, dtype='int32') # [1, 1, 1]
"""
return full_like(x=x, fill_value=1, dtype=dtype, name=name)
Expand Down

0 comments on commit c097b4b

Please sign in to comment.