diff --git a/python/paddle/sparse/creation.py b/python/paddle/sparse/creation.py index abf05746e85b8eeda7d627467b4e6599cb64d611..b57de8d245ce6a7a7b6b14de18eaaff632180203 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(