Merge pull request #10261 from reyoung/feature/change_assign_op

Feature/change assign op
intel-update-authors
Yu Yang 7 years ago committed by GitHub
commit 494554f53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -193,10 +193,7 @@ def assign(input, output):
helper = LayerHelper('assign', **locals())
if isinstance(input, Variable):
helper.append_op(
type='scale',
inputs={'X': [input]},
outputs={'Out': [output]},
attrs={'scale': 1.0})
type='assign', inputs={'X': [input]}, outputs={'Out': [output]})
elif isinstance(input, numpy.ndarray):
dtype = convert_np_dtype_to_dtype_(input.dtype)
if dtype == VarDesc.VarType.FP32:

Loading…
Cancel
Save