From 35308ce34d2e7603e395f134fecb9db5b50a09e0 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 11 Oct 2023 03:29:56 +0400 Subject: [PATCH] Use np.float32 instead of np.float (#20377) --- tests/layer_tests/onnx_tests/test_loop.py | 2 +- tools/mo/unit_tests/mo/front/tf/identityN_to_identity_test.py | 4 ++-- tools/mo/unit_tests/mo/middle/UpsampleToResample_test.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/layer_tests/onnx_tests/test_loop.py b/tests/layer_tests/onnx_tests/test_loop.py index 579c2dfca32..be90ccd106b 100644 --- a/tests/layer_tests/onnx_tests/test_loop.py +++ b/tests/layer_tests/onnx_tests/test_loop.py @@ -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: diff --git a/tools/mo/unit_tests/mo/front/tf/identityN_to_identity_test.py b/tools/mo/unit_tests/mo/front/tf/identityN_to_identity_test.py index 1c736ddb6ed..7a9ba24cc51 100644 --- a/tools/mo/unit_tests/mo/front/tf/identityN_to_identity_test.py +++ b/tools/mo/unit_tests/mo/front/tf/identityN_to_identity_test.py @@ -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'), diff --git a/tools/mo/unit_tests/mo/middle/UpsampleToResample_test.py b/tools/mo/unit_tests/mo/middle/UpsampleToResample_test.py index e65eef945a1..e1530ff61d3 100644 --- a/tools/mo/unit_tests/mo/middle/UpsampleToResample_test.py +++ b/tools/mo/unit_tests/mo/middle/UpsampleToResample_test.py @@ -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},