diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 148eea02343..56446104976 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -452,6 +452,15 @@ jobs: displayName: 'Layer Tests - Tensorflow' continueOnError: false + - script: | + python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt + export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH + export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64 + export TEST_DEVICE=CPU + $(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_fe.xmlTEST + displayName: 'TensorFlow 1 Layer Tests - TF FE' + continueOnError: false + - script: | python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH diff --git a/tests/layer_tests/tensorflow_tests/test_tf_BatchToSpace.py b/tests/layer_tests/tensorflow_tests/test_tf_BatchToSpace.py index 7323295d752..8ddc237c820 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_BatchToSpace.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_BatchToSpace.py @@ -29,8 +29,7 @@ class TestBatchToSpace(CommonTFLayerTest): x = tf.compat.v1.placeholder(tf.float32, in_shape, 'Input') crops = tf.constant(crops_value) block_shape = tf.constant(block_shape_value) - tf.batch_to_space_nd(x, block_shape, crops, name='Operation') - + tf.compat.v1.batch_to_space(x, crops, block_shape, name='Operation') tf.compat.v1.global_variables_initializer() tf_net = sess.graph_def diff --git a/tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py b/tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py index 72f809aa023..9973e65879d 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_BiasAdd.py @@ -159,7 +159,7 @@ class TestBiasAdd(CommonTFLayerTest): test_data_4D = [ dict(shape=[1, 1, 100, 224]), - dict(shape=[1, 3, 100, 224]) + pytest.param(dict(shape=[1, 3, 100, 224]), marks=pytest.mark.precommit_tf_fe) ] @pytest.mark.parametrize("params", test_data_4D) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_BinaryOps.py b/tests/layer_tests/tensorflow_tests/test_tf_BinaryOps.py index ab47a4d35a6..4b49b2237b0 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_BinaryOps.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_BinaryOps.py @@ -112,7 +112,8 @@ class TestBinaryOps(CommonTFLayerTest): return tf_net, ref_net test_data_precommits = [dict(x_shape=[2, 3, 4], y_shape=[2, 3, 4]), - dict(x_shape=[2, 3, 4, 5], y_shape=[2, 3, 4, 5])] + pytest.param(dict(x_shape=[2, 3, 4, 5], y_shape=[2, 3, 4, 5]), + marks=pytest.mark.precommit_tf_fe)] @pytest.mark.parametrize("params", test_data_precommits) @pytest.mark.parametrize("op_type", diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Bucketize.py b/tests/layer_tests/tensorflow_tests/test_tf_Bucketize.py index 926a87df1dd..d11976d208e 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Bucketize.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Bucketize.py @@ -60,7 +60,8 @@ class TestBucketize(CommonTFLayerTest): test_data_float32 = [ dict(input_shape=[5], input_type=tf.float32, boundaries_size=1), dict(input_shape=[5], input_type=tf.float32, boundaries_size=3), - dict(input_shape=[4, 8], input_type=tf.float32, boundaries_size=5), + pytest.param(dict(input_shape=[4, 8], input_type=tf.float32, boundaries_size=5), + marks=pytest.mark.precommit_tf_fe), dict(input_shape=[2, 4, 7], input_type=tf.float32, boundaries_size=10), dict(input_shape=[2, 4, 7, 8], input_type=tf.float32, boundaries_size=12), dict(input_shape=[2, 4, 7, 8, 10], input_type=tf.float32, boundaries_size=14)] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Concat.py b/tests/layer_tests/tensorflow_tests/test_tf_Concat.py index 589371d75c1..8958d6ffa1d 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Concat.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Concat.py @@ -80,9 +80,9 @@ class TestConcat(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_3D = [ - pytest.param(dict(shape=[1, 3, 224], axis=0), marks=pytest.mark.xfail(reason="*-19053")), - pytest.param(dict(shape=[1, 3, 224], axis=-1), marks=pytest.mark.xfail(reason="*-19053")), - pytest.param(dict(shape=[1, 3, 224], axis=2), marks=pytest.mark.xfail(reason="*-19053"))] + dict(shape=[1, 3, 224], axis=0), + pytest.param(dict(shape=[1, 3, 224], axis=-1), marks=pytest.mark.precommit_tf_fe), + dict(shape=[1, 3, 224], axis=2)] @pytest.mark.parametrize("params", test_data_3D) @pytest.mark.nightly diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Eltwise.py b/tests/layer_tests/tensorflow_tests/test_tf_Eltwise.py index c66c55c8210..4f5d80c8fbf 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Eltwise.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Eltwise.py @@ -57,7 +57,8 @@ class TestEltwise(CommonTFLayerTest): test_data = [] for operation in ['sum', 'max', 'mul']: test_data.extend([dict(shape=[1, 224], operation=operation), - dict(shape=[1, 224, 224], operation=operation), + pytest.param(dict(shape=[1, 224, 224], operation=operation), + marks=pytest.mark.precommit_tf_fe), dict(shape=[1, 3, 224, 224], operation=operation)]) @pytest.mark.parametrize("params", test_data) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_FakeQuantize.py b/tests/layer_tests/tensorflow_tests/test_tf_FakeQuantize.py index 64d2c750826..e7887120342 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_FakeQuantize.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_FakeQuantize.py @@ -5,8 +5,8 @@ import numpy as np import pytest from common.layer_test_class import check_ir_version from common.tf_layer_test_class import CommonTFLayerTest - from openvino.tools.mo.front.common.partial_infer.utils import int64_array + from unit_tests.utils.graph import build_graph, regular_op_with_shaped_data, connect, \ shaped_data, connect_front, regular_op @@ -89,8 +89,8 @@ class TestFakeQuantize(CommonTFLayerTest): test_data = [ # with8BitsNoScalingNoNudging - dict(il=0.0, ih=255.0, num_bits=8, narrow_range=False, nudged_il=0.0, nudged_ih=255.0, - expected_step=1.0), + pytest.param(dict(il=0.0, ih=255.0, num_bits=8, narrow_range=False, nudged_il=0.0, nudged_ih=255.0, + expected_step=1.0), marks=pytest.mark.precommit_tf_fe), # with8BitsScalingAndNudgingDown dict(il=0.5, ih=128.0, num_bits=8, narrow_range=False, nudged_il=0.0, nudged_ih=127.5, expected_step=0.5), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_GRUBlockCell.py b/tests/layer_tests/tensorflow_tests/test_tf_GRUBlockCell.py index 52249e305f2..db430f64007 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_GRUBlockCell.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_GRUBlockCell.py @@ -58,7 +58,7 @@ class TestTFGRUBlockCell(CommonTFLayerTest): dict(batch_size=1, input_size=15, hidden_size=10), dict(batch_size=2, input_size=6, hidden_size=6), dict(batch_size=2, input_size=12, hidden_size=6), - dict(batch_size=2, input_size=6, hidden_size=12), + pytest.param(dict(batch_size=2, input_size=6, hidden_size=12), marks=pytest.mark.precommit_tf_fe), ] @pytest.mark.parametrize("params", test_data) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Gather.py b/tests/layer_tests/tensorflow_tests/test_tf_Gather.py index 5a505838ad6..02e21838464 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Gather.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Gather.py @@ -50,7 +50,8 @@ class TestGather(CommonTFLayerTest): dict(data_shape=[10, 12], axis=1, indices=[[0, 1, 3, 4, 5], [6, 7, 9, 10, 11]], batch_dims=0), dict(data_shape=[8, 10, 12], axis=0, indices=[3, 6], batch_dims=0), - dict(data_shape=[8, 10, 12], axis=-1, indices=[5, 8], batch_dims=0), + pytest.param(dict(data_shape=[8, 10, 12], axis=-1, indices=[5, 8], batch_dims=0), + marks=pytest.mark.precommit_tf_fe), dict(data_shape=[6, 8, 10, 12], axis=0, indices=[2, 5], batch_dims=0), dict(data_shape=[6, 8, 10, 12], axis=-1, indices=[5, 8], batch_dims=0), dict(data_shape=[6, 8, 10, 12], axis=2, indices=[[0, 2, 4], [5, 7, 9]], batch_dims=0), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Identity.py b/tests/layer_tests/tensorflow_tests/test_tf_Identity.py index 5b5dce2f1a5..0da53a87766 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Identity.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Identity.py @@ -76,8 +76,8 @@ class TestIdentity(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data = [dict(shape=[1]), - dict(shape=[1, 224]), - pytest.param(dict(shape=[1, 3, 224]), marks=pytest.mark.xfail(reason="*-19053")), + pytest.param(dict(shape=[1, 224]), marks=pytest.mark.precommit_tf_fe), + dict(shape=[1, 3, 224]), dict(shape=[1, 3, 100, 224]), dict(shape=[1, 3, 50, 100, 224])] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_LogSoftmax.py b/tests/layer_tests/tensorflow_tests/test_tf_LogSoftmax.py index a1dad1e7894..1859f38be96 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_LogSoftmax.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_LogSoftmax.py @@ -131,7 +131,7 @@ class TestLogSoftmax(CommonTFLayerTest): test_data = [dict(shape=[1], reduction_axis=-1), dict(shape=[2, 5], reduction_axis=-1), - dict(shape=[5, 3, 7, 4], reduction_axis=-1), + pytest.param(dict(shape=[5, 3, 7, 4], reduction_axis=-1), marks=pytest.mark.precommit_tf_fe), dict(shape=[3, 2, 3, 7, 6], reduction_axis=-1)] @pytest.mark.parametrize("params", test_data) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Mul.py b/tests/layer_tests/tensorflow_tests/test_tf_Mul.py index 86194f8f9e9..0192d8ed61b 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Mul.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Mul.py @@ -277,7 +277,7 @@ class TestMul(CommonTFLayerTest): # Power dict(x_shape=[1, 3, 1, 1, 1], y_shape=[1, 1]), # ScaleShift - dict(x_shape=[1, 3, 1, 1, 1], y_shape=[3]), + pytest.param(dict(x_shape=[1, 3, 1, 1, 1], y_shape=[3]), marks=pytest.mark.precommit_tf_fe), # Eltwise dict(x_shape=[1, 1, 1, 1, 3], y_shape=[3]), # Eltwise diff --git a/tests/layer_tests/tensorflow_tests/test_tf_NormalizeL2.py b/tests/layer_tests/tensorflow_tests/test_tf_NormalizeL2.py index c7247a4557a..bd4918e4935 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_NormalizeL2.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_NormalizeL2.py @@ -5,8 +5,8 @@ import numpy as np import pytest from common.tf_layer_test_class import CommonTFLayerTest from common.utils.tf_utils import permute_nchw_to_nhwc - from openvino.tools.mo.front.common.partial_infer.utils import int64_array + from unit_tests.utils.graph import build_graph @@ -184,7 +184,7 @@ class TestNormalizeL2(CommonTFLayerTest): dict(shape=[5, 6], axes=[1], output_axes=[1]), dict(shape=[2, 3, 5], axes=[1], output_axes=[1]), dict(shape=[2, 3, 5], axes=[-2], output_axes=[1]), - dict(shape=[2, 3, 5], axes=[1, -1], output_axes=[1, 2]), + pytest.param(dict(shape=[2, 3, 5], axes=[1, -1], output_axes=[1, 2]), marks=pytest.mark.precommit_tf_fe), dict(shape=[2, 3, 5, 7], axes=[-1], output_axes=[1]), dict(shape=[2, 3, 5, 7], axes=[1, 2, 3], output_axes=[2, 3, 1]), ] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_OneHot.py b/tests/layer_tests/tensorflow_tests/test_tf_OneHot.py index e31b3dac7be..f7c5b26f2a9 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_OneHot.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_OneHot.py @@ -103,7 +103,8 @@ class TestOneHot(CommonTFLayerTest): # check for default on/off value, axis params dict(shape=[5, 6, 7], depth=8, on_value=None, off_value=None, axis=0), dict(shape=[5, 6, 7], depth=8, on_value=None, off_value=None, axis=1), - dict(shape=[5, 6, 7], depth=8, on_value=None, off_value=None, axis=2), + pytest.param(dict(shape=[5, 6, 7], depth=8, on_value=None, off_value=None, axis=2), + marks=pytest.mark.precommit_tf_fe), ] @pytest.mark.parametrize("params", test_data_3D) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_RandomUniform.py b/tests/layer_tests/tensorflow_tests/test_tf_RandomUniform.py index f45c8b5688d..8eb6baf9259 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_RandomUniform.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_RandomUniform.py @@ -6,8 +6,8 @@ import tensorflow as tf from common.layer_test_class import check_ir_version from common.tf_layer_test_class import CommonTFLayerTest from common.utils.tf_utils import permute_nchw_to_nhwc - from openvino.tools.mo.front.common.partial_infer.utils import int64_array + from unit_tests.utils.graph import build_graph, regular_op_with_shaped_data, connect, \ shaped_data, connect_front @@ -91,8 +91,8 @@ class TestTFRandomUniform(CommonTFLayerTest): input_type=tf.float32), dict(global_seed=None, op_seed=56197, min_val=-100, max_val=100, x_shape=[1, 2, 1, 1], input_type=tf.float32), - dict(global_seed=78132, op_seed=None, min_val=-200, max_val=-50, x_shape=[5, 8], - input_type=tf.int32), + pytest.param(dict(global_seed=78132, op_seed=None, min_val=-200, max_val=-50, x_shape=[5, 8], + input_type=tf.int32), marks=pytest.mark.precommit_tf_fe), dict(global_seed=4571, op_seed=48971, min_val=1.5, max_val=2.3, x_shape=[7], input_type=tf.float32), dict(global_seed=32465, op_seed=12335, min_val=-150, max_val=-100, x_shape=[18], diff --git a/tests/layer_tests/tensorflow_tests/test_tf_ReLU6.py b/tests/layer_tests/tensorflow_tests/test_tf_ReLU6.py index b784ceda81d..ec689d1440d 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_ReLU6.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_ReLU6.py @@ -76,8 +76,8 @@ class TestReLU6(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data = [dict(shape=[1]), - dict(shape=[1, 224]), - pytest.param(dict(shape=[1, 3, 224]), marks=pytest.mark.xfail(reason="*-19053")), + pytest.param(dict(shape=[1, 224]), marks=pytest.mark.precommit_tf_fe), + dict(shape=[1, 3, 224]), dict(shape=[1, 3, 100, 224]), dict(shape=[1, 3, 50, 100, 224])] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Reduce.py b/tests/layer_tests/tensorflow_tests/test_tf_Reduce.py index 270a1f624f5..16f58c6e685 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Reduce.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Reduce.py @@ -37,7 +37,7 @@ class TestReduceOps(CommonTFLayerTest): for operation in ['sum', 'max', 'prod', 'min', 'mean']: test_data.extend([ dict(shape=[2, 3], operation=operation, axis=1), - dict(shape=[2, 3, 5], operation=operation, axis=-2), + pytest.param(dict(shape=[2, 3, 5], operation=operation, axis=-2), marks=pytest.mark.precommit_tf_fe), dict(shape=[2, 3, 5, 7], operation=operation, axis=2), dict(shape=[2, 3, 5, 7, 9], operation=operation, axis=[2, -1]), ]) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Resample_pattern_new.py b/tests/layer_tests/tensorflow_tests/test_tf_Resample_pattern_new.py index d75fac0d393..d7f7c0a23ea 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Resample_pattern_new.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Resample_pattern_new.py @@ -72,13 +72,12 @@ class TestResamplePattern(CommonTFLayerTest): return tf_net, ref_net - test_data = [dict(shape=[1, 1, 100, 200], factor=2), + test_data = [pytest.param(dict(shape=[1, 1, 100, 200], factor=2), marks=pytest.mark.precommit_tf_fe), dict(shape=[1, 1, 200, 300], factor=3)] # TODO mark as precommit (after successfully passing in nightly) @pytest.mark.parametrize("params", test_data) @pytest.mark.nightly - @pytest.mark.xfail(reason="*-22273") def test_resample(self, params, ie_device, precision, ir_version, temp_dir, use_new_frontend, use_old_api): self._test(*self.create_resample_net(params['shape'], params['factor'], use_new_frontend), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_ReverseV2.py b/tests/layer_tests/tensorflow_tests/test_tf_ReverseV2.py index b3194544ba9..ba903c4ef46 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_ReverseV2.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_ReverseV2.py @@ -30,7 +30,7 @@ class TestReverseV2Ops(CommonTFLayerTest): test_data = [] test_data.extend([ dict(shape=[5], axis=[0]), - dict(shape=[2, 3], axis=[1]), + pytest.param(dict(shape=[2, 3], axis=[1]), marks=pytest.mark.precommit_tf_fe), dict(shape=[2, 3, 5], axis=[-2]), dict(shape=[2, 3, 5, 7], axis=[0]), ]) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Roll.py b/tests/layer_tests/tensorflow_tests/test_tf_Roll.py index d1681e25470..001dc0c8d1d 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Roll.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Roll.py @@ -29,7 +29,8 @@ class TestTFRoll(CommonTFLayerTest): return tf_net, ref_net test_data = [dict(shift=[1], axis=[-1], x_shape=[4, 3], input_type=tf.float32), - dict(shift=[1, 5, -7], axis=[0, 1, 1], x_shape=[2, 3, 5], input_type=tf.float16), + pytest.param(dict(shift=[1, 5, -7], axis=[0, 1, 1], x_shape=[2, 3, 5], input_type=tf.float16), + marks=pytest.mark.precommit_tf_fe), dict(shift=[11, -8], axis=[-1, -2], x_shape=[3, 4, 3, 1], input_type=tf.int32), dict(shift=[7, -2, 5], axis=[0, -1, -1], x_shape=[5, 2, 3, 7], input_type=tf.int64), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Rsqrt.py b/tests/layer_tests/tensorflow_tests/test_tf_Rsqrt.py index 82db2f5a860..a70fd005907 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Rsqrt.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Rsqrt.py @@ -64,8 +64,8 @@ class TestRsqrt(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data = [dict(shape=[1]), - dict(shape=[1, 224]), - pytest.param(dict(shape=[1, 3, 224]), marks=pytest.mark.xfail(reason="*-19053")), + pytest.param(dict(shape=[1, 224]), marks=pytest.mark.precommit_tf_fe), + dict(shape=[1, 3, 224]), dict(shape=[1, 3, 100, 224]), dict(shape=[1, 3, 50, 100, 224])] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py b/tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py index 5a0382551e2..f9bd20f66bd 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py @@ -61,7 +61,8 @@ class TestTFScatterND(CommonTFLayerTest): [[5.0, 5.0, 5.0, 5.0], [6.0, 6.0, 6.0, 6.0], [7.0, 7.0, 7.0, 7.0], [8.0, 8.0, 8.0, 8.0]]]), dict(x_shape=[2, 2, 2], indices=[[1, 1, 1], [0, 1, 0]], updates=[9.0, 6.3]), - dict(x_shape=[2, 2, 2], indices=[[0, 0], [0, 1]], updates=[[6.7, 9.0], [45.0, 8.3]]), + pytest.param(dict(x_shape=[2, 2, 2], indices=[[0, 0], [0, 1]], updates=[[6.7, 9.0], [45.0, 8.3]]), + marks=pytest.mark.precommit_tf_fe), dict(x_shape=[2, 2, 2], indices=[[1]], updates=[[[6.7, 9.0], [45.0, 8.3]]]), ] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Select.py b/tests/layer_tests/tensorflow_tests/test_tf_Select.py index 204fb398ef4..3cdd1e851af 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Select.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Select.py @@ -64,7 +64,7 @@ class TestSelect(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_2D = [ - dict(shape_condition=[2], shape_input=[2, 3]), + pytest.param(dict(shape_condition=[2], shape_input=[2, 3]), marks=pytest.mark.precommit_tf_fe), dict(shape_condition=[3, 5], shape_input=[3, 5]), ] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_SpaceToBatch.py b/tests/layer_tests/tensorflow_tests/test_tf_SpaceToBatch.py index eb017f3ed4f..1914c0c0624 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_SpaceToBatch.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_SpaceToBatch.py @@ -49,8 +49,8 @@ class TestSpaceToBatch(CommonTFLayerTest): out_shape=[4, 1, 1, 3]), dict(in_shape=[1, 2, 2, 1], block_shape_value=[2, 2], pads_value=[[0, 0], [0, 0]], out_shape=[4, 1, 1, 3]), - dict(in_shape=[1, 2, 2, 3], block_shape_value=[2, 2], pads_value=[[0, 0], [0, 0]], - out_shape=[4, 1, 1, 3]), + pytest.param(dict(in_shape=[1, 2, 2, 3], block_shape_value=[2, 2], pads_value=[[0, 0], [0, 0]], + out_shape=[4, 1, 1, 3]), marks=pytest.mark.precommit_tf_fe), dict(in_shape=[1, 2, 9, 1], block_shape_value=[4, 3], pads_value=[[1, 1], [2, 4]], out_shape=[12, 1, 1, 3]), # todo: enable these tests after supporting the general case on CPU diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Squeeze.py b/tests/layer_tests/tensorflow_tests/test_tf_Squeeze.py index 224477ca87a..ec107562285 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Squeeze.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Squeeze.py @@ -62,9 +62,9 @@ class TestSqueeze(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_2D = [ - pytest.param(dict(shape=[1, 1], axis=[]), marks=pytest.mark.xfail(reason="*-18807")), + dict(shape=[1, 1], axis=[]), dict(shape=[1, 1], axis=[0]), - dict(shape=[1, 1], axis=[-1]) + pytest.param(dict(shape=[1, 1], axis=[-1]), marks=pytest.mark.precommit_tf_fe) ] @pytest.mark.parametrize("params", test_data_2D) @@ -77,11 +77,9 @@ class TestSqueeze(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_3D = [ - pytest.param(dict(shape=[1, 1, 3], axis=[]), - marks=[pytest.mark.xfail(reason="*-18807"), - pytest.mark.xfail(reason="*-19053")]), - pytest.param(dict(shape=[1, 1, 3], axis=[0]), marks=pytest.mark.xfail(reason="*-19053")), - pytest.param(dict(shape=[1, 1, 3], axis=[-1]), marks=pytest.mark.xfail(reason="*-19053")) + dict(shape=[1, 1, 3], axis=[]), + dict(shape=[1, 1, 3], axis=[0]), + dict(shape=[1, 1, 3], axis=[-1]) ] # TODO mark as precommit (after successfully passing in nightly) @@ -95,8 +93,7 @@ class TestSqueeze(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_4D = [ - pytest.param(dict(shape=[1, 1, 50, 100], axis=[]), - marks=pytest.mark.xfail(reason="*-18807")), + dict(shape=[1, 1, 50, 100], axis=[]), dict(shape=[1, 1, 50, 100], axis=[0]), dict(shape=[1, 1, 50, 100], axis=[-1]), dict(shape=[1, 100, 50, 1], axis=[0, 2]) @@ -113,12 +110,9 @@ class TestSqueeze(CommonTFLayerTest): use_new_frontend=use_new_frontend, use_old_api=use_old_api) test_data_5D = [ - pytest.param(dict(shape=[1, 1, 50, 100, 224], axis=[]), - marks=pytest.mark.xfail(reason="*-18807")), - pytest.param(dict(shape=[1, 1, 50, 100, 224], axis=[0]), - marks=pytest.mark.xfail(reason="*-18879")), - pytest.param(dict(shape=[1, 1, 50, 100, 224], axis=[-1]), - marks=pytest.mark.xfail(reason="*-18879")), + dict(shape=[1, 1, 50, 100, 224], axis=[]), + dict(shape=[1, 1, 50, 100, 224], axis=[0]), + dict(shape=[1, 1, 50, 100, 224], axis=[-1]), dict(shape=[1, 224, 1, 100, 1], axis=[0, 3]), dict(shape=[1, 224, 1, 100, 1], axis=[0, 1, 3]), dict(shape=[1, 224, 1, 1, 100], axis=[0, 1, 2]), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_StridedSlice.py b/tests/layer_tests/tensorflow_tests/test_tf_StridedSlice.py index 45186cd51c4..ee715c66d23 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_StridedSlice.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_StridedSlice.py @@ -44,9 +44,9 @@ class TestStridedSlice(CommonTFLayerTest): end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=2), dict(input_shape=[1, 5, 1], begin=[0, 0, 0], end=[1, 5, 1], strides=[1, 1, 1], begin_mask=0, end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=4), - dict(input_shape=[1, 5, 5, 3], begin=[0, 0, 0, 0], end=[1, 5, 5, 3], strides=[1, 1, 1, 1], - begin_mask=0, - end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=1), + pytest.param(dict(input_shape=[1, 5, 5, 3], begin=[0, 0, 0, 0], end=[1, 5, 5, 3], strides=[1, 1, 1, 1], + begin_mask=0, end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=1), + marks=pytest.mark.precommit_tf_fe), dict(input_shape=[1, 1, 5, 3], begin=[0, 0, 0, 0], end=[1, 1, 5, 3], strides=[1, 1, 1, 1], begin_mask=0, end_mask=0, ellipsis_mask=0, new_axis_mask=0, shrink_axis_mask=2), diff --git a/tests/layer_tests/tensorflow_tests/test_tf_Sub.py b/tests/layer_tests/tensorflow_tests/test_tf_Sub.py index a5c0a4fe46b..75777a3123f 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_Sub.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_Sub.py @@ -64,7 +64,7 @@ class TestSub(CommonTFLayerTest): # Power dict(x_shape=[1], y_shape=[1]), # Eltwise - pytest.param(dict(x_shape=[3], y_shape=[3]), marks=pytest.mark.xfail(reason="*-19180")) + dict(x_shape=[3], y_shape=[3]) ] @pytest.mark.parametrize("params", test_data_1D) @@ -82,8 +82,7 @@ class TestSub(CommonTFLayerTest): # ScaleShift dict(x_shape=[1, 3], y_shape=[1, 3]), # Eltwise - pytest.param(dict(x_shape=[3, 1], y_shape=[3, 1]), - marks=pytest.mark.xfail(reason="*-19180")), + dict(x_shape=[3, 1], y_shape=[3, 1]), # Eltwise dict(x_shape=[2, 3], y_shape=[2, 3]) ] @@ -101,12 +100,9 @@ class TestSub(CommonTFLayerTest): # Power dict(x_shape=[1, 1, 1], y_shape=[1, 1, 1]), # ScaleShift - pytest.param(dict(x_shape=[1, 3, 1], y_shape=[1, 3, 1]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[1, 3, 1], y_shape=[1, 3, 1]), # Eltwise - pytest.param(dict(x_shape=[1, 1, 3], y_shape=[1, 1, 3]), - marks=[pytest.mark.xfail(reason="*-19053"), - pytest.mark.xfail(reason="*-18830")]), + dict(x_shape=[1, 1, 3], y_shape=[1, 1, 3]), # Eltwise pytest.param(dict(x_shape=[1, 3, 224], y_shape=[1, 3, 224]), marks=pytest.mark.xfail(reason="*-19053")) @@ -128,8 +124,7 @@ class TestSub(CommonTFLayerTest): # ScaleShift dict(x_shape=[1, 3, 1, 1], y_shape=[1, 3, 1, 1]), # Eltwise - pytest.param(dict(x_shape=[1, 1, 1, 3], y_shape=[1, 1, 1, 3]), - marks=pytest.mark.xfail(reason="*-19180")), + dict(x_shape=[1, 1, 1, 3], y_shape=[1, 1, 1, 3]), # Eltwise dict(x_shape=[1, 3, 222, 224], y_shape=[1, 3, 222, 224]) ] @@ -150,8 +145,7 @@ class TestSub(CommonTFLayerTest): # ScaleShift dict(x_shape=[1, 3, 1, 1, 1], y_shape=[1, 3, 1, 1, 1]), # Eltwise - pytest.param(dict(x_shape=[1, 1, 1, 1, 3], y_shape=[1, 1, 1, 1, 3]), - marks=pytest.mark.xfail(reason="*-19180")), + dict(x_shape=[1, 1, 1, 1, 3], y_shape=[1, 1, 1, 1, 3]), # Eltwise dict(x_shape=[1, 3, 50, 100, 224], y_shape=[1, 3, 50, 100, 224]) ] @@ -195,8 +189,7 @@ class TestSub(CommonTFLayerTest): # Eltwise dict(x_shape=[3, 1], y_shape=[3]), # Eltwise - pytest.param(dict(x_shape=[3, 1], y_shape=[1, 3, 1, 1]), - marks=pytest.mark.xfail(reason="*-19051")) + dict(x_shape=[3, 1], y_shape=[1, 3, 1, 1]), ] @pytest.mark.parametrize("params", test_data_broadcast_2D) @@ -212,23 +205,17 @@ class TestSub(CommonTFLayerTest): # Power dict(x_shape=[1, 1, 1], y_shape=[1]), # Power - pytest.param(dict(x_shape=[1, 3, 1], y_shape=[1]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[1, 3, 1], y_shape=[1]), # ScaleShift - pytest.param(dict(x_shape=[1, 3, 1], y_shape=[3]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[1, 3, 1], y_shape=[3]), # Eltwise - pytest.param(dict(x_shape=[1, 3, 1], y_shape=[3, 1]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[1, 3, 1], y_shape=[3, 1]), # Eltwise - pytest.param(dict(x_shape=[1, 1, 1], y_shape=[3, 1]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[1, 1, 1], y_shape=[3, 1]), # Eltwise - pytest.param(dict(x_shape=[3, 1, 224], y_shape=[1, 3, 224]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[3, 1, 224], y_shape=[1, 3, 224]), # Eltwise - pytest.param(dict(x_shape=[2, 3, 1], y_shape=[1, 3, 2]), - marks=pytest.mark.xfail(reason="*-19053")), + dict(x_shape=[2, 3, 1], y_shape=[1, 3, 2]), ] # TODO mark as precommit (after successfully passing in nightly) @@ -259,8 +246,7 @@ class TestSub(CommonTFLayerTest): # Eltwise dict(x_shape=[1, 3, 1, 2], y_shape=[1, 3, 2]), # Eltwise - pytest.param(dict(x_shape=[1, 3, 100, 224], y_shape=[1, 1, 1, 224]), - marks=pytest.mark.xfail(reason="*-19180")), + dict(x_shape=[1, 3, 100, 224], y_shape=[1, 1, 1, 224]), # Eltwise dict(x_shape=[2, 3, 1, 2], y_shape=[1, 3, 2, 1]) ] @@ -287,12 +273,11 @@ class TestSub(CommonTFLayerTest): # Eltwise dict(x_shape=[1, 3, 1, 1, 1], y_shape=[3, 1]), # Eltwise - dict(x_shape=[1, 3, 1, 1, 2], y_shape=[1, 3, 2]), + pytest.param(dict(x_shape=[1, 3, 1, 1, 2], y_shape=[1, 3, 2]), marks=pytest.mark.precommit_tf_fe), # Eltwise dict(x_shape=[1, 3, 5, 1, 2], y_shape=[5, 3, 2, 1]), # Eltwise - pytest.param(dict(x_shape=[1, 3, 50, 100, 224], y_shape=[1, 1, 1, 1, 224]), - marks=pytest.mark.xfail(reason="*-19180")), + dict(x_shape=[1, 3, 50, 100, 224], y_shape=[1, 1, 1, 1, 224]), # Eltwise dict(x_shape=[2, 3, 1, 2, 1], y_shape=[1, 3, 2, 1, 1]) ] diff --git a/tests/layer_tests/tensorflow_tests/test_tf_TopK.py b/tests/layer_tests/tensorflow_tests/test_tf_TopK.py index 7b1d03b5bda..3d4ee615cc0 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_TopK.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_TopK.py @@ -5,8 +5,8 @@ import pytest from common.layer_test_class import check_ir_version from common.tf_layer_test_class import CommonTFLayerTest from common.utils.tf_utils import permute_nchw_to_nhwc, permute_axis - from openvino.tools.mo.ops.op import PermuteAttrs + from unit_tests.utils.graph import build_graph diff --git a/tests/layer_tests/tensorflow_tests/test_tf_UnaryOps.py b/tests/layer_tests/tensorflow_tests/test_tf_UnaryOps.py index 47d1da0a127..f20c5723af0 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_UnaryOps.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_UnaryOps.py @@ -166,7 +166,7 @@ class TestUnaryOps(CommonTFLayerTest): ie_device, precision, ir_version, temp_dir=temp_dir, use_new_frontend=use_new_frontend, use_old_api=use_old_api) - test_data = [dict(shape=[10, 12]), + test_data = [pytest.param(dict(shape=[10, 12]), marks=pytest.mark.precommit_tf_fe), dict(shape=[8, 10, 12]), dict(shape=[6, 8, 10, 12]), dict(shape=[4, 6, 8, 10, 12])]