Skip to content

Commit 494554f

Browse files
authored
Merge pull request #10261 from reyoung/feature/change_assign_op
Feature/change assign op
2 parents 25779c9 + ac2911c commit 494554f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/paddle/fluid/layers/tensor.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,7 @@ def assign(input, output):
193193
helper = LayerHelper('assign', **locals())
194194
if isinstance(input, Variable):
195195
helper.append_op(
196-
type='scale',
197-
inputs={'X': [input]},
198-
outputs={'Out': [output]},
199-
attrs={'scale': 1.0})
196+
type='assign', inputs={'X': [input]}, outputs={'Out': [output]})
200197
elif isinstance(input, numpy.ndarray):
201198
dtype = convert_np_dtype_to_dtype_(input.dtype)
202199
if dtype == VarDesc.VarType.FP32:

0 commit comments

Comments
 (0)