From f745d6d9e4f13069df1c314126e6768328befe05 Mon Sep 17 00:00:00 2001 From: hong <43953930+phlrain@users.noreply.github.com> Date: Fri, 2 Aug 2019 11:57:46 +0800 Subject: [PATCH] fix expand op dtype build bugs; test=develop (#18932) --- python/paddle/fluid/layers/nn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 69cbf806600..ba3d3dd4735 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -9690,7 +9690,8 @@ def expand(x, expand_times, name=None): new_expand_times.append(ele) else: assert (isinstance(ele, int)) - temp_out = helper.create_variable_for_type_inference(dtype) + temp_out = helper.create_variable_for_type_inference( + "int32") fill_constant( [1], 'int32', ele, force_cpu=True, out=temp_out) new_expand_times.append(temp_out) -- GitLab