repo stringclasses 454
values | file_path stringlengths 5 201 | extension stringclasses 1
value | content stringlengths 8 509k | num_lines int64 3 16.9k | size_bytes int64 8 511k |
|---|---|---|---|---|---|
openvino | tests/layer_tests/tensorflow2_keras_tests/test_tf2_keras_alpha_dropout.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
import tensorflow as tf
from common.tf2_layer_test_class import CommonTF2LayerTest
class TestKerasAlphaDropout(CommonTF2LayerTest):
def create_keras_alpha_dropout_net(self, rate, input_names, input_shapes, input_type... | 54 | 2,842 |
openvino | tests/layer_tests/tensorflow2_keras_tests/test_tf2_keras_upsampling2d.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tensorflow as tf
from common.tf2_layer_test_class import CommonTF2LayerTest
rng = np.random.default_rng()
class TestKerasUpSampling2D(CommonTF2LayerTest):
def _prepare_input(self, inputs_inf... | 62 | 3,019 |
openvino | tests/layer_tests/tensorflow2_keras_tests/test_tf2_keras_masking.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
import tensorflow as tf
from common.tf2_layer_test_class import CommonTF2LayerTest
class TestKerasMasking(CommonTF2LayerTest):
def create_keras_masking_net(self, input_names, input_shapes, input_type, mask_value,
... | 43 | 1,853 |
openvino | tests/layer_tests/tensorflow2_keras_tests/test_tf2_keras_separableconv2d.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
import tensorflow as tf
from common.tf2_layer_test_class import CommonTF2LayerTest
class TestKerasSeparableConv2D(CommonTF2LayerTest):
def create_keras_separableconv2d_net(self, input_names, input_shapes, input_type,... | 128 | 7,512 |
openvino | tests/layer_tests/tensorflow2_keras_tests/test_tf2_keras_global_maxpool2D.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
import tensorflow as tf
from common.tf2_layer_test_class import CommonTF2LayerTest
class TestKerasGlobalMaxPool2D(CommonTF2LayerTest):
def create_keras_global_maxpool2D_net(self, input_names, input_shapes, input_type... | 42 | 1,726 |
openvino | tests/layer_tests/tensorflow2_keras_tests/conftest.py | .py | import inspect
import logging as log
import os
from pathlib import Path
import pytest
from common.layer_test_class import get_params
from common.logger import *
from common.utils.common_utils import copy_files_by_pattern
def pytest_generate_tests(metafunc):
test_gen_attrs_names = list(inspect.signature(get_param... | 17 | 507 |
openvino | tests/layer_tests/jax_tests/test_div.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax.numpy as jnp
import numpy as np
import pytest
from jax_layer_test_class import JaxLayerTest
def get_rand_jnp_array(shape, dtype):
if dtype in [np.float32, np.float16, np.float64]:
res = np.random.uniform(-1000, ... | 140 | 4,526 |
openvino | tests/layer_tests/jax_tests/test_binary_comparison.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(56342)
class TestBinaryComparison(JaxLayerTest):
def _prepare_input(self):... | 60 | 2,409 |
openvino | tests/layer_tests/jax_tests/test_reduce_window_max.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestReduceWindowMax(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.r... | 54 | 1,849 |
openvino | tests/layer_tests/jax_tests/jax_layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import itertools
import jax
import numpy as np
import os
from common.constants import test_device, test_precision
from copy import deepcopy
from openvino import Core
class JaxLayerTest:
@staticmethod
def _check_kind_exist(jaxp... | 179 | 6,896 |
openvino | tests/layer_tests/jax_tests/test_transpose.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestTranspose(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.rand(*s... | 47 | 1,592 |
openvino | tests/layer_tests/jax_tests/test_dot_general.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax_layer_test_class import JaxLayerTest
class TestDotGeneral(JaxLayerTest):
def _prepare_input(self):
lhs = np.random.randint(-10, 10, self.lhs_shape).astype(self.... | 49 | 1,948 |
openvino | tests/layer_tests/jax_tests/test_mul.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax.numpy as jnp
import numpy as np
import pytest
from jax_layer_test_class import JaxLayerTest
def get_rand_jnp_array(shape, dtype):
if dtype in [np.float32, np.float16, np.float64]:
return jnp.array(np.random.unif... | 138 | 4,499 |
openvino | tests/layer_tests/jax_tests/test_select_n.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(5402)
class TestSelectN(JaxLayerTest):
def _prepare_input(self):
cases = [... | 46 | 1,590 |
openvino | tests/layer_tests/jax_tests/test_integer_pow.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(34455)
class TestIntegerPow(JaxLayerTest):
def _prepare_input(self):
if np... | 49 | 1,747 |
openvino | tests/layer_tests/jax_tests/test_concatenate.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(34455)
class TestConcatenate(JaxLayerTest):
def _prepare_input(self):
inpu... | 52 | 1,889 |
openvino | tests/layer_tests/jax_tests/test_conv_general_dilated.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestConvGeneralDilated(JaxLayerTest):
def _prepare_input(self):
lhs = np.random.rand(*se... | 64 | 2,687 |
openvino | tests/layer_tests/jax_tests/test_exp.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(109734)
class TestExp(JaxLayerTest):
def _prepare_input(self):
if np.issub... | 46 | 1,559 |
openvino | tests/layer_tests/jax_tests/test_broadcast_in_dim.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestBroadcastInDim(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.ra... | 47 | 1,851 |
openvino | tests/layer_tests/jax_tests/test_argmax.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(706670)
class TestArgmax(JaxLayerTest):
def _prepare_input(self):
... | 63 | 2,698 |
openvino | tests/layer_tests/jax_tests/test_reduce_window_sum.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestReduceWindoSum(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.ra... | 54 | 1,838 |
openvino | tests/layer_tests/jax_tests/test_erfc.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(109734)
class TestErfc(JaxLayerTest):
def _prepare_input(self):
# erf are ... | 39 | 1,127 |
openvino | tests/layer_tests/jax_tests/test_stop_gradient.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(233454)
class TestStopGradient(JaxLayerTest):
def _prepare_input(self):
if... | 49 | 1,601 |
openvino | tests/layer_tests/jax_tests/test_square.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(34455)
class TestSquare(JaxLayerTest):
def _prepare_input(self):
if np.iss... | 45 | 1,571 |
openvino | tests/layer_tests/jax_tests/test_reduce.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(3456834)
class TestReduce(JaxLayerTest):
def _prepare_input(self):
if np.issubdtype(s... | 51 | 1,877 |
openvino | tests/layer_tests/jax_tests/test_add.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax.numpy as jnp
import numpy as np
import pytest
from jax_layer_test_class import JaxLayerTest
def get_rand_jnp_array(shape, dtype):
if dtype in [np.float32, np.float16, np.float64]:
return jnp.array(np.random.unif... | 138 | 4,499 |
openvino | tests/layer_tests/jax_tests/test_sqrt.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(34455)
class TestSqrt(JaxLayerTest):
def _prepare_input(self):
if np.issub... | 44 | 1,420 |
openvino | tests/layer_tests/jax_tests/test_squeeze.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestSqueeze(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.rand(*sel... | 51 | 1,803 |
openvino | tests/layer_tests/jax_tests/test_negative.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(56342)
class TestNeg(JaxLayerTest):
def _prepare_input(self):
if n... | 51 | 1,689 |
openvino | tests/layer_tests/jax_tests/test_erf.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(109734)
class TestErf(JaxLayerTest):
def _prepare_input(self):
# erf are m... | 40 | 1,148 |
openvino | tests/layer_tests/jax_tests/test_logistic.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(5402)
class TestLogistic(JaxLayerTest):
def _prepare_input(self):
input =... | 38 | 1,130 |
openvino | tests/layer_tests/jax_tests/test_reshape.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestReshape(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.rand(*sel... | 86 | 2,703 |
openvino | tests/layer_tests/jax_tests/test_tanh.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(109734)
class TestTanh(JaxLayerTest):
def _prepare_input(self):
if np.issu... | 46 | 1,565 |
openvino | tests/layer_tests/jax_tests/test_sub.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax.numpy as jnp
import numpy as np
import pytest
from jax_layer_test_class import JaxLayerTest
def get_rand_jnp_array(shape, dtype):
if dtype in [np.float32, np.float16, np.float64]:
return jnp.array(np.random.unif... | 138 | 4,499 |
openvino | tests/layer_tests/jax_tests/test_copy.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestCopy(JaxLayerTest):
def _prepare_input(self):
lhs = jnp.array(np.random.rand(*self.i... | 43 | 1,174 |
openvino | tests/layer_tests/jax_tests/test_rsqrt.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestRsqrt(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.rand(*self.... | 41 | 1,050 |
openvino | tests/layer_tests/jax_tests/test_device_put.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import jax
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
rng = np.random.default_rng(233454)
class TestDevicePut(JaxLayerTest):
def _prepare_input(... | 46 | 1,452 |
openvino | tests/layer_tests/jax_tests/test_slice.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
from jax import lax
from jax import numpy as jnp
from jax_layer_test_class import JaxLayerTest
class TestSlice(JaxLayerTest):
def _prepare_input(self):
inp = jnp.array(np.random.rand(*self.... | 82 | 2,810 |
openvino | tests/layer_tests/common/tf2_layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
from common.layer_test_class import CommonLayerTest
from common.utils.tflite_utils import get_tflite_results, save_tf2_saved_model_to_tflite
def save_to_tf2_savedmodel(tf2_model, path_to_saved_tf2_model):
import tensorfl... | 47 | 1,832 |
openvino | tests/layer_tests/common/layer_utils.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import platform
import subprocess
import sys
from common.utils.multiprocessing_utils import multiprocessing_run
from openvino import Core, get_version as ie2_get_version
# Not all layer tests use openvino_tokenizers
try:
# noinspect... | 92 | 3,325 |
openvino | tests/layer_tests/common/logger.py | .py | # -*- coding: utf-8 -*-
# Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging as log
import os
import re
class TagFilter(log.Filter):
def __init__(self, regex):
"""Initialize the TagFilter with a regular expression."""
log.Filter.__init__(self)
s... | 39 | 1,199 |
openvino | tests/layer_tests/common/layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import defusedxml.ElementTree as ET
import itertools
import numpy as np
import os
import re
import warnings
from common.constants import test_device, test_precision
from common.layer_utils import InferAPI
from common.utils.common_utils i... | 197 | 8,827 |
openvino | tests/layer_tests/common/mo_convert_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import sys
from pathlib import Path
from common.utils.common_utils import generate_ir
from common.utils.common_utils import shell
from openvino.test_utils import compare_functions
from openvino.tools.ovc import ovc
def generate_ir_ov... | 99 | 3,707 |
openvino | tests/layer_tests/common/constants.py | .py | # -*- coding: utf-8 -*-
# Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
if os.environ.get('OUTPUT_DIR') is not None:
out_path = os.environ['OUTPUT_DIR']
else:
script_path = os.path.dirname(os.path.realpath(__file__))
out_path = os.path.join(script_path, 'out')
... | 19 | 559 |
openvino | tests/layer_tests/common/tf_layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from common.layer_utils import InferAPI
from common.utils.common_utils import generate_ir_python_api
from common.utils.tf_utils import save_to_pb
from common.utils.tf_utils import summarize_graph
from common.utils.tfli... | 177 | 7,770 |
openvino | tests/layer_tests/common/tflite_layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
from tensorflow.lite.tools import flatbuffer_utils as utils
from common.layer_test_class import CommonLayerTest
from common.utils.tflite_utils import get_tflite_r... | 81 | 3,568 |
openvino | tests/layer_tests/common/onnx_layer_test_class.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
from common.layer_test_class import CommonLayerTest
from common.layer_utils import BaseInfer
def save_to_onnx(onnx_model, path_to_saved_onnx_model):
import onnx
path = os.path.join(path_to_saved_onnx_model, 'model.on... | 55 | 1,902 |
openvino | tests/layer_tests/common/utils/tflite_utils.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import itertools
import os
import warnings
import numpy as np
import tensorflow as tf
from common.utils.tf_utils import summarize_graph
def make_positive_array(inputs_dict):
for input in inputs_dict.keys():
inputs_dict[in... | 148 | 4,796 |
openvino | tests/layer_tests/common/utils/common_utils.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging
import numpy as np
import os
import platform
import shutil
import subprocess
import sys
from pathlib import Path
logger = logging.getLogger(__name__)
def generate_ir(coverage=False, **kwargs):
from openvino.tools.ov... | 142 | 5,684 |
openvino | tests/layer_tests/common/utils/tf_utils.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import os
import re
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
def run_in_jenkins():
if "JENKINS_URL" in os.environ and len(os.environ["JENKINS_URL"]):
return True
return False
... | 166 | 6,683 |
openvino | tests/layer_tests/common/utils/multiprocessing_utils.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging as log
import os
import platform
import signal
import sys
import traceback
from multiprocessing import Process, Queue, TimeoutError, ProcessError
from queue import Empty as QueueEmpty
from typing import Union
from collecti... | 101 | 3,821 |
openvino | tests/layer_tests/ovc_python_api_tests/test_ovc_cli_tool.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import re
import sys
import tempfile
import unittest
from pathlib import Path
import numpy as np
import openvino as ov
from openvino import PartialShape, Model
from openvino.test_utils import compare_functions
from openvino.to... | 211 | 7,778 |
openvino | tests/layer_tests/ovc_python_api_tests/test_tf_output_order.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tempfile
import tensorflow as tf
from common import constants
from pathlib import Path
def create_net_list(input_names, input_shapes):
tf.keras.backend.clear_session()
# Create TensorFlo... | 101 | 3,957 |
openvino | tests/layer_tests/ovc_python_api_tests/test_paddle.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import tempfile
import unittest
import numpy as np
import openvino as ov
import pytest
from openvino import PartialShape, Model
from openvino.test_utils import compare_functions
from common.mo_convert_test_class import CommonMOConvertT... | 185 | 6,405 |
openvino | tests/layer_tests/ovc_python_api_tests/test_complex_params.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import tempfile
import unittest
import numpy as np
import openvino as ov
import pytest
from openvino import PartialShape, Type, Dimension
from common.mo_convert_test_class import CommonMOConvertTest
from common.utils.tf_utils... | 258 | 10,323 |
openvino | tests/layer_tests/ovc_python_api_tests/test_tf.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import openvino as ov
import os
import sys
import pytest
import tempfile
import tensorflow as tf
import unittest
from common import constants
from common.layer_test_class import CommonLayerTest
from common.mo_convert_te... | 1,359 | 48,864 |
openvino | tests/layer_tests/ovc_python_api_tests/test_ovc_tool_help.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import sys
import unittest
from openvino.tools.ovc import ovc
from openvino.tools.ovc.cli_parser import get_mo_convert_params
from pathlib import Path
from common.utils.common_utils import shell
class TestSubprocessMoConver... | 31 | 1,000 |
openvino | tests/layer_tests/ovc_python_api_tests/test_pytorch.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import tempfile
import unittest
import numpy as np
import pytest
import torch
from common.mo_convert_test_class import CommonMOConvertTest
import openvino as ov
from openvino import PartialShape, Dimension, Model, Type
clas... | 1,704 | 67,434 |
openvino | tests/layer_tests/ovc_python_api_tests/test_extensions.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import pytest
import numpy as np
from common.mo_convert_test_class import CommonMOConvertTest
from common.onnx_layer_test_class import save_to_onnx
import openvino as ov
from openvino import PartialShape, Model
class TestExtensions(C... | 122 | 4,098 |
openvino | tests/layer_tests/ovc_python_api_tests/test_tf_unsupported_ops.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import re
import tempfile
import unittest
from pathlib import Path
import pytest
import tensorflow as tf
from openvino.frontend import OpConversionFailure
from common import constants
from common.utils.tf_utils import save_to_pb
@tf.... | 99 | 3,757 |
openvino | tests/layer_tests/ovc_python_api_tests/test_onnx.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import io
import tempfile
import unittest
import numpy as np
import openvino as ov
import pytest
from openvino import Model
from openvino.test_utils import compare_functions
from common.mo_convert_test_class import CommonMOConvertTest
... | 135 | 4,245 |
openvino | tests/layer_tests/ovc_python_api_tests/conftest.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import inspect
from common.layer_test_class import get_params
def pytest_generate_tests(metafunc):
test_gen_attrs_names = list(inspect.signature(get_params).parameters)
params = get_params()
metafunc.parametrize(test_gen_... | 14 | 359 |
openvino | tests/layer_tests/ovc_python_api_tests/telemetry/test_pytorch_telemetry.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from unittest.mock import MagicMock, patch
import openvino_telemetry as tm
import torch
from openvino.tools.ovc import convert_model
def arange_pt_model():
class aten_arange_end_dtype(torch.nn.Module):
def... | 48 | 1,513 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_FullyConnected.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape_x': [40, 37], 'shape_y': [37, 37]},
{'shape_x': [5, 5], 'shape_y': [4, 5]},
{'shape_x': [1, 5, 5], 'shape_y': [4, 5]},
]
class TestTFLiteFullyConnectedLayerTest(TFLiteLayerTest):
... | 35 | 1,305 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_ArgValue.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import additional_test_params
from common.utils.tflite_utils import parametrize_tests
test_ops = [
{'op_name': 'ARG_MAX', 'op_func': 'tf.math.argmax'},
{'op_name': 'ARG_MIN', 'op_fun... | 42 | 1,513 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Cumsum.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'input_shape': [2], 'axis':-1, 'exclusive': False, 'reverse': False},
{'input_shape': [2, 3],... | 42 | 1,605 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Pad.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'op_name': 'PAD', 'shape': [1, 1, 2, 1, 1], 'paddings': [[0, 0], [0, 1], [2, 3], [0, 0], [1, 0]]},
{'op_name': 'PAD', 'shape': [2, 1, 1, 1, 1], 'paddings': [[0, 1], [0, 0], [0, 0], [2, 3], [1, 0]]... | 62 | 2,875 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Relu0To1.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import numpy as np
import pytest
import tensorflow as tf
from tensorflow.lite.python import schema_py_generated as schema_fb
from tensorflow.lite.tools import flatbuffer_utils as utils
from common.tflite_layer_test_class impo... | 67 | 2,624 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_MatrixDiag.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [3]},
{'shape': [1, 22]},
{'shape': [1, 1, 8]},
{'shape': [1, 22, 22, 8]},
{'shape': [1, 22, 22, 8, 3]},
]
class TestTFLiteMatrixDiagLayerTest(TFLiteLayerTest):
inputs =... | 35 | 1,160 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_BatchMatmul.py | .py | import pytest
import tensorflow as tf
import numpy as np
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shapes': ((None, 4, 5), (None, 5, 6), (3, 4, 5), (3, 5, 6)), 'adjoint_a': True, 'adjoint_b': True},
{'shapes': ((None, 1, 3, 4), (None, 4, 2), (2, 1, 3, 4), (5, 4, 2)), 'adjoin... | 66 | 2,856 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Unary.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from functools import partial
import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import parametrize_tests
np.random.seed(42)
test_ops = [
... | 74 | 3,257 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Unpack.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'shape': [3, 4, 3], 'axis': 0},
{'shape': [3, 4, 3], 'axis': -1},
{'sh... | 42 | 1,372 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_AddN.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import parametrize_tests
num_inputs = [
{'num_inputs': 2},
{'num_inputs': 4},
{'num_inputs': 5},
]
test_params = [
{'shape': [2, 10, 10, 3]},
{'shape': [2, 10]}
]
test_... | 47 | 1,467 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Range.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'dtype': np.float32, 'negative_delta': False},
{'dtype': np.int32, 'negative_delta': True},
]
class TestTFLiteRangeLayerTest(TFLiteLayerTest):
inputs =... | 53 | 1,997 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_QuantizeMultiOutputs.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import copy
import pytest
import numpy as np
import tensorflow as tf
from tensorflow.lite.python import schema_py_generated as schema_fb
from tensorflow.lite.tools import flatbuffer_utils as utils
from common.tflite_layer_test... | 184 | 8,382 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Concat.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shapes': [[1, 3], [1, 7]], 'axis': -1},
{'shapes': [[1, 3, 10], [1, 3, 56], [1, 3, 2]], 'axis': -1},
{'shapes': [[1, 3, 10, 17], [1, 3, 10, 1], [1, 3, 10, 5], [1, 3, 10, 3]], 'axis': -1},
... | 40 | 1,660 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_RFFT2D.py | .py | import platform
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [96, 1, 512], 'fft_length': [1, 512], 'reshape_to': [96, 257]},
{'shape': [5, 1, 16], 'fft_length': [1, 16], 'reshape_to': [5, 9]},
]
class TestTFLiteRFFT2DLayerTest(TF... | 39 | 1,523 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Reduce.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import additional_test_params
from common.utils.tflite_utils import parametrize_tests
test_ops = [
{'op_name': 'MEAN', 'op_func': 'tf.math.reduce_mean'},
{'op_name': 'REDUCE_ALL', 'o... | 47 | 1,993 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_OneHot.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [3], 'axis': 0, 'kwargs_to_prepare_input': 'int32_positive'},
{'shape': [4, 4], 'axis': 1, 'kwargs_to_prepare_input': 'int32_positive'},
{'shape': [1, 5, 3], 'axis': 0, 'kwargs_to_pre... | 39 | 1,677 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_MirrorPad.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2, 3], 'padding_matrix': [[1, 1], [2, 1]], 'mode': 'REFLECT'},
{'shape': [2, 3], 'padding_matrix': [[1, 1], [1, 1]], 'mode': 'REFLECT'},
{'shape': [2, 3], 'padding... | 40 | 1,664 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Fill.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2, 3], 'value': 1, 'kwargs_to_prepare_input': 'int32_positive'},
{'shape': [2, 3, 3, 4], 'value': -1, 'kwargs_to_prepare_input': 'int32_positive'},
{'shape': [1], 'value': 0, 'kwargs... | 33 | 1,270 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_SpaceToDepth.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [8, 10, 10, 16], 'block_size': 2},
{'shape': [24, 10, 10, 50], 'block_size': 5},
]
class TestTFLiteSpaceToDepthLayerTest(TFLiteLayerTest):
inputs = ["Input"]
outputs = ["SpaceTo... | 32 | 1,184 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Pool.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import parametrize_tests
test_ops = [
{'op_name': 'AVERAGE_POOL_2D', 'op_func': 'tf.nn.avg_pool2d'},
{'op_name': 'MAX_POOL_2D', 'op_func': 'tf.nn.max_pool2d'},
]
test_params = [
... | 44 | 1,816 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Transpose.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2, 3], 'perm': [1, 0], 'conjugate': False},
{'shape': [2, 3, 5], 'perm': [2, 0, 1], 'conjugate': True},
{'shape': [2, 3, 5, 10], 'perm': [1, 2, 3, 0], 'conjugate': False},
]
class ... | 33 | 1,191 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_GatherND.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [5, 1], 'indices_shape': [1, 1], 'batch_dims': 0},
{'shape': [5, 5], 'indices_shape': [2, 1], 'batch_dims': 0},
{'shape': [5, 5], 'indices_shape': [2, 2], 'batch_d... | 51 | 2,001 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_SelectV2.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2, 3, 1, 2, 2], 'condition': [True, False]},
{'shape': [4, 3, 1, 2], 'condition': [False, True]},
{'shape': [3, 3, 3, 3], 'condition': [True, True, False]},
{'shape': [3, 3, 3], ... | 37 | 1,406 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Unique.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'shape': [15]},
{'shape': [1]}
]
class TestTFLiteUniqueLayerTest(TFLiteL... | 38 | 1,161 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_BatchToSpaceND.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [8, 10, 10, 3], 'block_shape': [2, 2], 'crops': [[0, 2], [0, 0]]},
{'shape': [24, 10, 10, 1], 'block_shape': [2, 12], 'crops': [[2, 0], [0, 2]]}
]
class TestTFLiteBatchToSpaceNDLayerTes... | 33 | 1,305 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Resize.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import parametrize_tests
test_ops = [
{'op_name': ['RESIZE_BILINEAR'], 'op_func': 'tf.compat.v1.image.resize_bilinear'},
{'op_name': ['RESIZE_NEAREST_NEIGHBOR'], 'op_func': 'tf.compa... | 51 | 2,466 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Split.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [6], 'num_or_size_splits': 2, 'axis': 0},
{'shape': [2, 1, 6], 'num_or_size_splits': 3, 'axis': 2},
{'shape': [4, 3, 2, 7], 'num_or_size_splits': 4, 'axis': -4},
]
class TestTFLiteS... | 33 | 1,229 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_EmbeddingLookup.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'shape': [10, 5], 'indices_shape': [3]},
{'shape': [20, 8], 'indices_shape': [1, 5]},
{'shape': [15, 10, 7], 'indices_shape': [4]},
{'shape': [8, 6, ... | 40 | 1,456 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_While.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
class TestTFLiteWhileLayerTest(TFLiteLayerTest):
inputs = ["Input"]
outputs = ["While"]
allowed_ops = ["AD... | 31 | 1,000 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Select.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2, 3, 1, 2, 2], 'condition': [True, False]},
{'shape': [4, 3, 1, 2], 'condition': [False, False, False, True]},
{'shape': [2, 3], 'condition': [[True, True, True], [False, False, Fal... | 36 | 1,361 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Where.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'shape': [10]},
{'shape': [1, 2, 3, 4]},
{'shape': [8, 7, 6, 5, 4, 3, 2, 1]}
]
class TestTFLiteWhereLayerTest(TFLiteLayerTest):
inputs = ["Input"]
... | 40 | 1,219 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_TransposeConv.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import os
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'shape': [1, 3, 4, 1], 'ksize': [1, 1, 1, 1], 'output_shape': [1, 3,... | 101 | 4,716 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_Tile.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [2], 'multiples': [2]},
{'shape': [2, 3], 'multiples': [1, 2]},
{'shape': [2, 3, 1], 'multiples': [5, 1, 3]},
]
class TestTFLiteTileLayerTest(TFLiteLayerTest):
inputs = ["Input"... | 33 | 1,079 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_StableHLOComposite.py | .py | # Copyright (C) 2018-2026 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import numpy as np
import pytest
from flatbuffers import flexbuffers
from tensorflow.lite.python import schema_py_generated as schema_fb
from tensorflow.lite.tools import flatbuffer_utils as fb_utils
import openvino as ov
te... | 331 | 13,875 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_ScatterND.py | .py | import numpy as np
import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
np.random.seed(42)
test_params = [
{'indices_shape': [4, 1], 'indices_value': [4, 3, 1, 7], 'updates_dtype': np.int32, 'updates_shape': [4],
'shape_shape': [1], 'shape_value': [8]},
{'indi... | 75 | 3,825 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_SplitV.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
test_params = [
{'shape': [3], 'num_or_size_splits': [0, 2, 0, 1], 'axis': 0},
{'shape': [2, 3, 9], 'num_or_size_splits': [1, 2, 3, -1, 1], 'axis': 2},
{'shape': [3, 9, 5, 4], 'num_or_size_splits': [1, 2, 0, -... | 40 | 1,624 |
openvino | tests/layer_tests/tensorflow_lite_tests/test_tfl_BinaryWithActivation.py | .py | import pytest
import tensorflow as tf
from common.tflite_layer_test_class import TFLiteLayerTest
from common.utils.tflite_utils import additional_test_params, activation_helper
from common.utils.tflite_utils import parametrize_tests
test_ops = [
{'op_name': 'ADD', 'op_func': 'tf.math.add'},
{'op_name': 'DIV',... | 48 | 1,970 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.