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

!1333 fixed erfc

Merge pull request !1333 from jiangjinsheng/vm_erfc
......@@ -142,6 +142,7 @@ __all__ = [
'ReLUV2',
'Elu',
'Erf',
'Erfc',
'Sigmoid',
'HSwish',
'HSigmoid',
......
......@@ -84,7 +84,7 @@ class GeSwitch(PrimitiveWithInfer):
the true branch will be activated, or vise verse.
Inputs:
- **data** (Tensor) - The data to be used for switch control.
- **data** (Union[Tensor, Number]) - The data to be used for switch control.
- **pred** (Tensor) - It should be a scalar whose type is bool and shape is `()`, It is used as condition for
switch control.
Outputs:
......@@ -144,7 +144,7 @@ class Merge(PrimitiveWithInfer):
One and only one of the inputs should be selected as the output
Inputs:
- **inputs** (Tuple) - The data to be merged.
- **inputs** (Tuple) - The data to be merged. All tuple elements should have same data type.
Outputs:
tuple. Output is tuple(`data`, `output_index`). The `data` has the same shape of `inputs` element.
......@@ -171,6 +171,5 @@ class Merge(PrimitiveWithInfer):
for i, item in enumerate(inputs):
args['inputs[%d]' % i] = item
validator.check_tensor_type_same(
args, (mstype.bool_,) + mstype.number_type, self.name)
validator.check_scalar_or_tensor_type_same(args, (mstype.bool_,) + mstype.number_type, self.name)
return (inputs[0], mstype.int32)
......@@ -1397,14 +1397,14 @@ class EqualCount(PrimitiveWithInfer):
"""
Computes the number of the same elements of two tensors.
The two input tensors should have same shape.
The two input tensors should have same shape and same data type.
Inputs:
- **input_x** (Tensor) - The first input tensor.
- **input_y** (Tensor) - The second input tensor.
Outputs:
Tensor, with the type as `mindspore.int32` and size as (1,).
Tensor, with the type same as input tensor and size as (1,).
Examples:
>>> input_x = Tensor(np.array([1, 2, 3]), mindspore.int32)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册