Skip to content

Commit b7634a8

Browse files
wanghaoshuangguoshengCS
authored andcommitted
Fix relu and log op.
1 parent 9cd020c commit b7634a8

File tree

1 file changed

+4
-4
lines changed
  • python/paddle/fluid/layers

1 file changed

+4
-4
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4941,9 +4941,9 @@ def log(input):
49414941
output = fluid.layers.log(input)
49424942
"""
49434943
helper = LayerHelper('log', **locals())
4944-
dtype = helper.input_dtype()
4944+
dtype = helper.input_dtype(input_param_name='x')
49454945
out = helper.create_tmp_variable(dtype)
4946-
helper.append_op(type="log", inputs={"X": input}, outputs={"Out": out})
4946+
helper.append_op(type="log", inputs={"X": x}, outputs={"Out": out})
49474947
return out
49484948

49494949

@@ -4970,9 +4970,9 @@ def relu(input):
49704970
output = fluid.layers.relu(input)
49714971
"""
49724972
helper = LayerHelper('relu', **locals())
4973-
dtype = helper.input_dtype()
4973+
dtype = helper.input_dtype(input_param_name='x')
49744974
out = helper.create_tmp_variable(dtype)
4975-
helper.append_op(type="relu", inputs={"X": input}, outputs={"Out": out})
4975+
helper.append_op(type="relu", inputs={"X": x}, outputs={"Out": out})
49764976
return out
49774977

49784978

0 commit comments

Comments
 (0)