From 402288ad6525f08d00a0b05eb66ed52dc1ad3e3a Mon Sep 17 00:00:00 2001 From: liym27 <33742067+liym27@users.noreply.github.com> Date: Wed, 17 Mar 2021 19:13:53 +0800 Subject: [PATCH] In __getitem__, convert integers to int64 Tensor not int32 to be compatible with Lite(#31658) --- python/paddle/fluid/framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 04ed384846f..036e8ab3044 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -877,7 +877,7 @@ def _getitem_impl_(var, item): new_list_tensor.append(dim) else: assert (isinstance(dim, int)) - temp_out = var.block.create_var(dtype='int32') + temp_out = var.block.create_var(dtype='int64') fill_constant([1], dim, force_cpu=True, out=temp_out) new_list_tensor.append(temp_out) return new_list_tensor -- GitLab