Use np.float32 instead of np.float (#20377)
This commit is contained in:
parent
e24b6211e3
commit
35308ce34d
|
|
@ -16,7 +16,7 @@ class TestLoop(OnnxRuntimeLayerTest):
|
|||
if tensor_type == TensorProto.INT64:
|
||||
np_type = np.int64
|
||||
elif tensor_type == TensorProto.FLOAT:
|
||||
np_type = np.float
|
||||
np_type = np.float32
|
||||
elif tensor_type == TensorProto.BOOL:
|
||||
np_type = bool
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ nodes = {
|
|||
**regular_op_with_shaped_data('placeholder_0', [1, 227, 227, 3], {'type': 'Parameter'}),
|
||||
**regular_op_with_shaped_data('placeholder_1', [1, 227, 227, 3], {'type': 'Parameter'}),
|
||||
|
||||
**regular_op_with_empty_data('identityN', {'op': 'IdentityN', 'type': None, 'data_types': [np.int32, np.float],
|
||||
**regular_op_with_empty_data('identityN', {'op': 'IdentityN', 'type': None, 'data_types': [np.int32, np.float32],
|
||||
'name': 'my_identity'}),
|
||||
**empty_data('identityN_1_d'),
|
||||
**regular_op_with_empty_data('identity0', {'op': 'Identity', 'type': None, 'data_type': np.int32,
|
||||
'name': 'my_identity/0_port'}),
|
||||
**regular_op_with_empty_data('identity1', {'op': 'Identity', 'type': None, 'data_type': np.float,
|
||||
**regular_op_with_empty_data('identity1', {'op': 'Identity', 'type': None, 'data_type': np.float32,
|
||||
'name': 'my_identity/1_port'}),
|
||||
|
||||
**result('output0'),
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ new_ref_graph_node_attr = {
|
|||
'ss_stride_data': {'kind': 'data', 'value': int64_array([1]), 'shape': int64_array([1])},
|
||||
'strided_slice': {'type': 'StridedSlice', 'kind': 'op', 'op': 'StridedSlice'},
|
||||
'strided_slice_data': {'kind': 'data', 'shape': None, 'value': None},
|
||||
'cast_to_float': {'kind': 'op', 'op': 'Cast', 'type': 'Convert', 'dst_type': np.float},
|
||||
'cast_to_float': {'kind': 'op', 'op': 'Cast', 'type': 'Convert', 'dst_type': np.float32},
|
||||
'cast_to_float_d': {'kind': 'data', 'value': None, 'shape': None},
|
||||
'factor': {'kind': 'op', 'op': 'Const', 'type': 'Const', 'value': int64_array([5, 5]), 'shape': int64_array([2])},
|
||||
'factor_data': {'kind': 'data', 'value': int64_array([5, 5]), 'shape': int64_array([2])},
|
||||
|
|
@ -104,7 +104,7 @@ ref_graph_node_attrs = {
|
|||
'ss_end_data': {'kind': 'data', 'value': None, 'shape': None},
|
||||
'ss_stride': {'kind': 'op', 'op': 'Const', 'type': 'Const', 'value': int64_array([1]), 'shape': int64_array([1])},
|
||||
'ss_stride_data': {'kind': 'data', 'value': None, 'shape': None},
|
||||
'cast_to_float': {'kind': 'op', 'op': 'Cast', 'type': 'Convert', 'dst_type': np.float},
|
||||
'cast_to_float': {'kind': 'op', 'op': 'Cast', 'type': 'Convert', 'dst_type': np.float32},
|
||||
'cast_to_float_d': {'kind': 'data', 'value': None, 'shape': None},
|
||||
'mul': {'type': 'Multiply', 'kind': 'op', 'op': 'Multiply'},
|
||||
'mul_data': {'kind': 'data', 'shape': None, 'value': None},
|
||||
|
|
|
|||
Loading…
Reference in New Issue