Skip to content

Commit 73409d5

Browse files
authored
Fix log1p (#25488)
1 parent e362095 commit 73409d5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

python/paddle/tensor/math.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ def min(input, dim=None, keep_dim=False, out=None, name=None):
13861386
return out
13871387

13881388

1389-
def log1p(x, out=None, name=None):
1389+
def log1p(x, name=None):
13901390
"""
13911391
:alias_main: paddle.log1p
13921392
:alias: paddle.log1p,paddle.tensor.log1p,paddle.tensor.math.log1p
@@ -1396,9 +1396,6 @@ def log1p(x, out=None, name=None):
13961396
Out = \\ln(x+1)
13971397
Args:
13981398
x (Variable): Input LoDTensor or Tensor. Must be one of the following types: float32, float64.
1399-
out(Variable, optional): Optional output which can be any created
1400-
Variable that meets the requirements to store the result of operation.
1401-
if out is None, a new Varibale will be create to store the result.
14021399
name(str, optional): The default value is None. Normally there is no need for
14031400
user to set this property. For more information, please refer to :ref:`api_guide_Name`
14041401
Returns:
@@ -1427,11 +1424,11 @@ def log1p(x, out=None, name=None):
14271424
inputs = {'X': [x]}
14281425
helper = LayerHelper('log1p', **locals())
14291426
dtype = helper.input_dtype(input_param_name='x')
1430-
if out is None:
1431-
out = helper.create_variable_for_type_inference(dtype)
1427+
out = helper.create_variable_for_type_inference(dtype)
14321428
helper.append_op(type="log1p", inputs={"X": x}, outputs={"Out": out})
14331429
return out
14341430

1431+
14351432
def addcmul(input, tensor1, tensor2, value=1.0, out=None, name=None):
14361433
"""
14371434
:alias_main: paddle.addcmul

0 commit comments

Comments
 (0)