From e7f0aa38aba0c831657c8de324b87d4ac927dad9 Mon Sep 17 00:00:00 2001 From: caozhou <48191911+Caozhou1995@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:47:37 +0800 Subject: [PATCH] fix dtype bug (#41802) --- 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 3a8dfdc8580..5fa110e4db0 100644 --- a/python/paddle/fluid/layers/tensor.py +++ b/python/paddle/fluid/layers/tensor.py @@ -678,8 +678,7 @@ def assign(input, output=None): raise ValueError("The size of input is too big. Please consider " "saving it to file and 'load_op' to load it") if output is None: - output = helper.create_variable_for_type_inference( - dtype=input.dtype) + output = helper.create_variable_for_type_inference(dtype=dtype) helper.append_op( type='assign_value', outputs={'Out': [output]}, -- GitLab