forked from mindspore-Ecosystem/mindspore
commit
3b76823141
|
@ -30,7 +30,7 @@ broadcast_to_op_info = TBERegOp("BroadcastTo") \
|
|||
.dtype_format(DataType.F32_Default, DataType.F32_Default) \
|
||||
.dtype_format(DataType.I32_Default, DataType.I32_Default) \
|
||||
.dtype_format(DataType.I8_Default, DataType.I8_Default) \
|
||||
.dtype_format(DataType.U8_Default, DataType.U16_Default) \
|
||||
.dtype_format(DataType.U8_Default, DataType.U8_Default) \
|
||||
.get_op_info()
|
||||
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ transpose_d_op_info = TBERegOp("Transpose") \
|
|||
.attr("perm", "optional", "listInt", "all") \
|
||||
.input(0, "x", False, "required", "all") \
|
||||
.output(0, "y", False, "required", "all") \
|
||||
.dtype_format(DataType.BOOL_Default, DataType.BOOL_Default) \
|
||||
.dtype_format(DataType.I8_Default, DataType.I8_Default) \
|
||||
.dtype_format(DataType.U8_Default, DataType.U8_Default) \
|
||||
.dtype_format(DataType.I16_Default, DataType.I16_Default) \
|
||||
|
|
|
@ -1407,7 +1407,7 @@ class BiasAdd(PrimitiveWithInfer):
|
|||
except for the channel axis.
|
||||
|
||||
Inputs:
|
||||
- **input_x** (Tensor) - Input value, with shape :math:`(N, C)` or :math:`(N, C, H, W)`.
|
||||
- **input_x** (Tensor) - Input value. The input shape can be 2-4 dimensions.
|
||||
- **bias** (Tensor) - Bias value, with shape :math:`(C)`.
|
||||
|
||||
Outputs:
|
||||
|
@ -1433,8 +1433,7 @@ class BiasAdd(PrimitiveWithInfer):
|
|||
|
||||
def infer_dtype(self, x_type, b_type):
|
||||
args = {"input_x": x_type, "bias": b_type}
|
||||
valid_types = (mstype.int8, mstype.int32, mstype.float16, mstype.float32)
|
||||
validator.check_tensor_type_same(args, valid_types, self.name)
|
||||
validator.check_tensor_type_same(args, mstype.number_type, self.name)
|
||||
return x_type
|
||||
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ class BoundingBoxEncode(PrimitiveWithInfer):
|
|||
|
||||
@prim_attr_register
|
||||
def __init__(self, means=(0.0, 0.0, 0.0, 0.0), stds=(1.0, 1.0, 1.0, 1.0)):
|
||||
validator.check_value_type('means', means, [tuple, list], self.name)
|
||||
validator.check_value_type('stds', stds, [tuple, list], self.name)
|
||||
validator.check_value_type('means', means, (tuple), self.name)
|
||||
validator.check_value_type('stds', stds, (tuple), self.name)
|
||||
for i, value in enumerate(means):
|
||||
validator.check_value_type("means[%d]" % i, value, [float], self.name)
|
||||
for i, value in enumerate(stds):
|
||||
|
@ -147,8 +147,8 @@ class BoundingBoxDecode(PrimitiveWithInfer):
|
|||
|
||||
@prim_attr_register
|
||||
def __init__(self, max_shape, means=(0.0, 0.0, 0.0, 0.0), stds=(1.0, 1.0, 1.0, 1.0), wh_ratio_clip=0.016):
|
||||
validator.check_value_type('means', means, [tuple, list], self.name)
|
||||
validator.check_value_type('stds', stds, [tuple, list], self.name)
|
||||
validator.check_value_type('means', means, (tuple), self.name)
|
||||
validator.check_value_type('stds', stds, (tuple), self.name)
|
||||
for i, value in enumerate(means):
|
||||
validator.check_value_type("means[%d]" % i, value, [float], self.name)
|
||||
for i, value in enumerate(stds):
|
||||
|
|
Loading…
Reference in New Issue