From 6d88fed0cf34357a4c379096cfe22ca13be965a3 Mon Sep 17 00:00:00 2001 From: HydrogenSulfate <490868991@qq.com> Date: Fri, 16 Dec 2022 11:59:40 +0800 Subject: [PATCH] fix(sparse_coo_tensor): convert shape to list when shape is tuple (#49103) --- python/paddle/sparse/creation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/sparse/creation.py b/python/paddle/sparse/creation.py index abf05746e8..b57de8d245 100644 --- a/python/paddle/sparse/creation.py +++ b/python/paddle/sparse/creation.py @@ -152,6 +152,7 @@ def sparse_coo_tensor( if shape is None: shape = min_shape else: + shape = list(shape) if shape < min_shape: raise ValueError( "the minimun shape required is {}, but get {}".format( -- GitLab