Skip to content

Commit 8806801

Browse files
TomorrowIsAnOtherDayreyoung
authored andcommitted
[fix assign op] using assign op instead of scale1.0
1 parent 76c4ae8 commit 8806801

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/paddle/fluid/layers/tensor.py

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

0 commit comments

Comments
 (0)