diff --git a/src/bindings/python/tests_compatibility/test_ngraph/test_reduction.py b/src/bindings/python/tests_compatibility/test_ngraph/test_reduction.py index c5dd2fe54c0..e1bac52b738 100644 --- a/src/bindings/python/tests_compatibility/test_ngraph/test_reduction.py +++ b/src/bindings/python/tests_compatibility/test_ngraph/test_reduction.py @@ -142,7 +142,7 @@ def test_roi_align(): [([5, 2], 0, False), ([5, 2], 1, False), ([5, 2, 6], 2, False), ([5, 2], 0, True)], ) def test_cum_sum(input_shape, cumsum_axis, reverse): - input_data = np.arange(np.prod(input_shape)).reshape(input_shape) + input_data = np.arange(np.prod(input_shape), dtype=np.int64).reshape(input_shape) node = ng.cum_sum(input_data, cumsum_axis, reverse=reverse) assert node.get_output_size() == 1 diff --git a/src/bindings/python/tests_compatibility/test_ngraph/test_roll.py b/src/bindings/python/tests_compatibility/test_ngraph/test_roll.py index a2446284e03..b912eb5ebc3 100644 --- a/src/bindings/python/tests_compatibility/test_ngraph/test_roll.py +++ b/src/bindings/python/tests_compatibility/test_ngraph/test_roll.py @@ -8,7 +8,7 @@ import numpy as np def test_roll(): - input = np.reshape(np.arange(10), (2, 5)) + input = np.reshape(np.arange(10, dtype=np.int64), (2, 5)) input_tensor = ng.constant(input) input_shift = ng.constant(np.array([-10, 7], dtype=np.int32)) input_axes = ng.constant(np.array([-1, 0], dtype=np.int32)) diff --git a/src/bindings/python/tests_compatibility/test_ngraph/test_sequence_processing.py b/src/bindings/python/tests_compatibility/test_ngraph/test_sequence_processing.py index 9b5ba178753..e5e85480060 100644 --- a/src/bindings/python/tests_compatibility/test_ngraph/test_sequence_processing.py +++ b/src/bindings/python/tests_compatibility/test_ngraph/test_sequence_processing.py @@ -9,7 +9,14 @@ from ngraph.impl import Type def test_onehot(): param = ng.parameter([3], dtype=np.int32) - model = ng.one_hot(param, 3, 1, 0, 0) + # output type is derived from 'on_value' and 'off_value' element types + # Need to set explicitly 'on_value' and 'off_value' types. + # If we don't do it explicitly, depending on OS/packages versions types can be unpredictably either int32 or int64 + on_value = np.array(1, dtype=np.int64) + off_value = np.array(0, dtype=np.int64) + depth = 3 + axis = 0 + model = ng.one_hot(param, depth, on_value, off_value, axis) assert model.get_output_size() == 1 assert model.get_type_name() == "OneHot" assert list(model.get_output_shape(0)) == [3, 3] diff --git a/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py b/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py index 08589e3cbc5..f83b75a78e7 100644 --- a/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py +++ b/tests/layer_tests/mo_python_api_tests/test_mo_convert_tf.py @@ -375,7 +375,7 @@ def create_tf_stateful_partioned_call_net(temp_dir): param1 = ov.opset8.parameter(data_shape, dtype=np.float32) param2 = ov.opset8.parameter(filters_shape, dtype=np.float32) - transpose2 = ov.opset8.transpose(param2, np.array([3, 2, 0, 1])) + transpose2 = ov.opset8.transpose(param2, np.array([3, 2, 0, 1], dtype=np.int64)) conv = ov.opset11.convolution(param1, transpose2, strides, pads_begin, pads_end, dilations, auto_pad="same_upper") parameter_list = [param1, param2]