From 027b708652aa02fa760f1b9bd345e5229420bcad Mon Sep 17 00:00:00 2001 From: maoyaomin Date: Thu, 9 Feb 2023 15:41:36 +0800 Subject: [PATCH] fix the parameter dimension of operator roll must be 0 --- mindspore/python/mindspore/ops/operations/math_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/python/mindspore/ops/operations/math_ops.py b/mindspore/python/mindspore/ops/operations/math_ops.py index d79b3d295ce..caa0a77b9f9 100644 --- a/mindspore/python/mindspore/ops/operations/math_ops.py +++ b/mindspore/python/mindspore/ops/operations/math_ops.py @@ -7929,5 +7929,5 @@ class Roll(Primitive): validator.check_equal_int(len(axis), 1, "shift size", self.name) validator.check_equal_int(axis[0], 0, "axis", self.name) elif isinstance(shift, int) and isinstance(axis, int): - validator.check_equal_int(axis, 0, "axis", self.name) + validator.check_is_int(axis, "axis", self.name) self.init_prim_io_names(inputs=['input_x'], outputs=['output'])