提交 205cfec6 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1571 Equalcount check input shape same

Merge pull request !1571 from VectorSL/equalcount
...@@ -1415,7 +1415,7 @@ class EqualCount(PrimitiveWithInfer): ...@@ -1415,7 +1415,7 @@ class EqualCount(PrimitiveWithInfer):
""" """
Computes the number of the same elements of two tensors. Computes the number of the same elements of two tensors.
The two input tensors should have same data type. The two input tensors should have same data type and shape.
Inputs: Inputs:
- **input_x** (Tensor) - The first input tensor. - **input_x** (Tensor) - The first input tensor.
...@@ -1438,6 +1438,7 @@ class EqualCount(PrimitiveWithInfer): ...@@ -1438,6 +1438,7 @@ class EqualCount(PrimitiveWithInfer):
self.init_prim_io_names(inputs=['x', 'y'], outputs=['output']) self.init_prim_io_names(inputs=['x', 'y'], outputs=['output'])
def infer_shape(self, x_shape, y_shape): def infer_shape(self, x_shape, y_shape):
validator.check("x_shape", x_shape, "y_shape", y_shape, Rel.EQ, self.name)
output_shape = (1,) output_shape = (1,)
return output_shape return output_shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册