From 8806801eb8064a53e6c17685051615f829a1f45b Mon Sep 17 00:00:00 2001 From: robot <2466956298@qq.com> Date: Wed, 25 Apr 2018 16:57:56 +0800 Subject: [PATCH] [fix assign op] using assign op instead of scale1.0 --- python/paddle/fluid/layers/tensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/paddle/fluid/layers/tensor.py b/python/paddle/fluid/layers/tensor.py index da066c34bde..5b8f55db72f 100644 --- a/python/paddle/fluid/layers/tensor.py +++ b/python/paddle/fluid/layers/tensor.py @@ -193,10 +193,9 @@ def assign(input, output): helper = LayerHelper('assign', **locals()) if isinstance(input, Variable): helper.append_op( - type='scale', + type='assign', inputs={'X': [input]}, outputs={'Out': [output]}, - attrs={'scale': 1.0}) elif isinstance(input, numpy.ndarray): dtype = convert_np_dtype_to_dtype_(input.dtype) if dtype == VarDesc.VarType.FP32: -- GitLab