未验证 提交 494554f5 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #10261 from reyoung/feature/change_assign_op

Feature/change assign op
...@@ -193,10 +193,7 @@ def assign(input, output): ...@@ -193,10 +193,7 @@ def assign(input, output):
helper = LayerHelper('assign', **locals()) helper = LayerHelper('assign', **locals())
if isinstance(input, Variable): if isinstance(input, Variable):
helper.append_op( helper.append_op(
type='scale', type='assign', inputs={'X': [input]}, outputs={'Out': [output]})
inputs={'X': [input]},
outputs={'Out': [output]},
attrs={'scale': 1.0})
elif isinstance(input, numpy.ndarray): elif isinstance(input, numpy.ndarray):
dtype = convert_np_dtype_to_dtype_(input.dtype) dtype = convert_np_dtype_to_dtype_(input.dtype)
if dtype == VarDesc.VarType.FP32: if dtype == VarDesc.VarType.FP32:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册