Use protobuf-lite for ONNX FE by default (#6829)
This commit is contained in:
@@ -29,7 +29,7 @@ target_include_directories(${TARGET_NAME} PUBLIC $<BUILD_INTERFACE:${ONNX_COMMON
|
||||
$<INSTALL_INTERFACE:${FRONTEND_INSTALL_INCLUDE}>)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ngraph)
|
||||
link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LIBRARIES})
|
||||
link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LITE_LIBRARIES})
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE ${ONNX_COMMON_SRC_DIR})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
add_definitions("-DSERIALIZED_ZOO=\"${CMAKE_CURRENT_SOURCE_DIR}/models\"")
|
||||
add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/ngraph/models\")
|
||||
set(NGRAPH_ONNX_NAMESPACE ngraph_onnx)
|
||||
|
||||
add_subdirectory(runtime)
|
||||
@@ -374,7 +374,7 @@ if (NGRAPH_UNIT_TEST_BACKENDS_ENABLE)
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} INTERPRETER)
|
||||
endif()
|
||||
|
||||
add_definitions("-DTEST_FILES=\"${CMAKE_CURRENT_SOURCE_DIR}/files\"")
|
||||
add_definitions("-DTEST_FILES=\"${TEST_MODEL_ZOO}/ngraph/files\"")
|
||||
add_subdirectory(util)
|
||||
|
||||
# backend specific test files must meet the following requirements:
|
||||
@@ -530,7 +530,7 @@ set(MULTI_TEST_SRC
|
||||
backend/zero_sized.in.cpp
|
||||
)
|
||||
|
||||
if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE)
|
||||
if (NGRAPH_ONNX_IMPORT_ENABLE)
|
||||
list(APPEND MULTI_TEST_SRC
|
||||
onnx/onnx_import.in.cpp
|
||||
onnx/onnx_import_controlflow.in.cpp
|
||||
@@ -621,7 +621,7 @@ target_link_libraries(unit-test PRIVATE ngraph_test_util
|
||||
|
||||
# Protobuf-lite does not support parsing files from prototxt format
|
||||
# Since most of the onnx models are stored in this format it have to be disabled
|
||||
if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE)
|
||||
if (NGRAPH_ONNX_IMPORT_ENABLE)
|
||||
# It's needed by onnx_import_library.cpp and onnx_import_exceptions.cpp tests to include onnx_pb.h.
|
||||
# Not linking statically to libprotobuf (linked into libonnx) avoids false-failing onnx_editor tests.
|
||||
target_include_directories(unit-test
|
||||
@@ -682,3 +682,6 @@ if (NGRAPH_PDPD_FRONTEND_ENABLE AND paddlepaddle_FOUND)
|
||||
COMPONENT tests
|
||||
EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
# process models
|
||||
add_dependencies(unit-test test_model_zoo)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <frontend_manager/frontend_manager.hpp>
|
||||
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
#include "utils.hpp"
|
||||
#include "paddle_utils.hpp"
|
||||
#include "utils.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace ngraph::frontend;
|
||||
@@ -32,9 +32,12 @@ TEST(FrontEndConvertModelTest, test_unsupported_op)
|
||||
ASSERT_NO_THROW(function = frontEnd->convert_partially(inputModel));
|
||||
ASSERT_THROW(frontEnd->convert(function), OpConversionFailure);
|
||||
|
||||
for (auto& node : function->get_ordered_ops()) {
|
||||
if (node->get_friendly_name() == "rxyz_0.tmp_0") {
|
||||
function->replace_node(node, std::make_shared<opset6::Relu>(node->input(0).get_source_output()));
|
||||
for (auto& node : function->get_ordered_ops())
|
||||
{
|
||||
if (node->get_friendly_name() == "rxyz_0.tmp_0")
|
||||
{
|
||||
function->replace_node(
|
||||
node, std::make_shared<opset6::Relu>(node->input(0).get_source_output()));
|
||||
}
|
||||
}
|
||||
ASSERT_NO_THROW(frontEnd->convert(function));
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
ngraph ONNXImporter:<3A>
|
||||
|
||||
A
|
||||
BX add_node1"Add
|
||||
|
||||
X
|
||||
CY add_node2"Add
|
||||
test_graphZ
|
||||
A
|
||||
|
||||
|
||||
Z
|
||||
B
|
||||
|
||||
|
||||
Z
|
||||
C
|
||||
|
||||
|
||||
b
|
||||
Y
|
||||
|
||||
|
||||
B
|
||||
@@ -1,95 +0,0 @@
|
||||
ir_version: 3
|
||||
producer_name: "nGraph ONNX Importer"
|
||||
graph {
|
||||
node {
|
||||
input: "cond"
|
||||
output: "cond_bool"
|
||||
op_type: "Cast"
|
||||
attribute {
|
||||
name: "to"
|
||||
i: 9
|
||||
type: INT
|
||||
}
|
||||
}
|
||||
node {
|
||||
input: "cond_bool"
|
||||
input: "x1"
|
||||
input: "x2"
|
||||
output: "y"
|
||||
op_type: "Where"
|
||||
}
|
||||
name: "where_graph"
|
||||
input {
|
||||
name: "cond"
|
||||
type {
|
||||
tensor_type {
|
||||
elem_type: INT32
|
||||
shape {
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
input {
|
||||
name: "x1"
|
||||
type {
|
||||
tensor_type {
|
||||
elem_type: INT32
|
||||
shape {
|
||||
dim {
|
||||
dim_value: 1
|
||||
}
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
input {
|
||||
name: "x2"
|
||||
type {
|
||||
tensor_type {
|
||||
elem_type: INT32
|
||||
shape {
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
dim {
|
||||
dim_value: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
output {
|
||||
name: "y"
|
||||
type {
|
||||
tensor_type {
|
||||
elem_type: INT32
|
||||
shape {
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
dim {
|
||||
dim_value: 3
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
opset_import {
|
||||
version: 9
|
||||
}
|
||||
@@ -24,6 +24,7 @@ Options:
|
||||
from docopt import docopt
|
||||
from google.protobuf import text_format
|
||||
import onnx
|
||||
from onnx.external_data_helper import convert_model_to_external_data
|
||||
import os
|
||||
|
||||
ONNX_SUFFX = '.onnx'
|
||||
@@ -53,6 +54,18 @@ _ext_map = {
|
||||
def _get_output_file_path(path, extension):
|
||||
return path + _ext_map[extension]
|
||||
|
||||
|
||||
def save_model(proto, f, format=None, save_as_external_data=False, all_tensors_to_one_file=True, location=None, size_threshold=1024, convert_attribute=False):
|
||||
if isinstance(proto, bytes):
|
||||
proto = onnx._deserialize(proto, onnx.ModelProto())
|
||||
|
||||
if save_as_external_data:
|
||||
convert_model_to_external_data(proto, all_tensors_to_one_file, location, size_threshold, convert_attribute)
|
||||
|
||||
s = onnx._serialize(proto)
|
||||
onnx._save_bytes(s, f)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = docopt(__doc__)
|
||||
input_file_path = args['INPUT_FILE']
|
||||
@@ -61,8 +74,6 @@ if __name__ == '__main__':
|
||||
else:
|
||||
output_file_path = args['OUTPUT_FILE']
|
||||
|
||||
print('Converting {} to {}.'.format(input_file_path, output_file_path))
|
||||
|
||||
if not os.path.exists(input_file_path):
|
||||
sys.exit('ERROR: Provided input model path does not exists: {}'.format(input_file_path))
|
||||
|
||||
@@ -75,6 +86,6 @@ if __name__ == '__main__':
|
||||
elif _is_txt_file(input_file_path) and _is_bin_file(output_file_path):
|
||||
with open(input_file_path, 'r') as f:
|
||||
converted_model = _txt2bin(f.read())
|
||||
onnx.save(converted_model, output_file_path)
|
||||
save_model(converted_model, output_file_path)
|
||||
else:
|
||||
sys.exit('ERROR: Provided input or output file has unsupported format.')
|
||||
|
||||
@@ -54,7 +54,7 @@ NGRAPH_TEST(onnx_editor, types__single_input_type_substitution)
|
||||
{
|
||||
// the original model contains 2 inputs with i64 data type and one f32 input
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")};
|
||||
|
||||
editor.set_input_types({{"A", element::i64}});
|
||||
|
||||
@@ -77,7 +77,7 @@ NGRAPH_TEST(onnx_editor, types__all_inputs_type_substitution)
|
||||
{
|
||||
// the original model contains 2 inputs with i64 data type and one f32 input
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")};
|
||||
|
||||
editor.set_input_types({{"A", element::i8}, {"B", element::i8}, {"C", element::i8}});
|
||||
|
||||
@@ -98,7 +98,7 @@ NGRAPH_TEST(onnx_editor, types__all_inputs_type_substitution)
|
||||
NGRAPH_TEST(onnx_editor, types__missing_type_in_input_descriptor)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_type.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_type.onnx")};
|
||||
|
||||
// input A doesn't have the "type" field in the model and so the data type cannot be modified
|
||||
EXPECT_THROW(editor.set_input_types({{"A", element::f32}}), ngraph_error);
|
||||
@@ -107,7 +107,7 @@ NGRAPH_TEST(onnx_editor, types__missing_type_in_input_descriptor)
|
||||
NGRAPH_TEST(onnx_editor, types__missing_tensor_type_in_input_descriptor)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_tensor_type.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/invalid_input_no_tensor_type.onnx")};
|
||||
|
||||
// input A doesn't have the "tensor_type" field in the model
|
||||
EXPECT_THROW(editor.set_input_types({{"A", element::f32}}), ngraph_error);
|
||||
@@ -116,7 +116,7 @@ NGRAPH_TEST(onnx_editor, types__missing_tensor_type_in_input_descriptor)
|
||||
NGRAPH_TEST(onnx_editor, types__unsupported_data_type_passed)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")};
|
||||
|
||||
EXPECT_THROW(editor.set_input_types({{"A", element::dynamic}}), ngraph_error);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ NGRAPH_TEST(onnx_editor, types__unsupported_data_type_passed)
|
||||
NGRAPH_TEST(onnx_editor, types__incorrect_input_name_passed)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_abc.onnx")};
|
||||
|
||||
EXPECT_THROW(editor.set_input_types({{"ShiaLaBeouf", element::i64}}), ngraph_error);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ NGRAPH_TEST(onnx_editor, types__elem_type_missing_in_input)
|
||||
{
|
||||
// the original model contains 2 inputs with i64 data type and one f32 input
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/elem_type_missing_in_input.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/elem_type_missing_in_input.onnx")};
|
||||
|
||||
// the "elem_type" is missing in the model but it should be possible to set the type anyway
|
||||
EXPECT_NO_THROW(editor.set_input_types({{"A", element::i64}}));
|
||||
@@ -154,7 +154,7 @@ NGRAPH_TEST(onnx_editor, types__elem_type_missing_in_input)
|
||||
NGRAPH_TEST(onnx_editor, shapes__modify_single_input)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape{1};
|
||||
|
||||
@@ -169,7 +169,7 @@ NGRAPH_TEST(onnx_editor, shapes__modify_single_input)
|
||||
NGRAPH_TEST(onnx_editor, shapes__modify_all_inputs)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape{1, 2, 3, 5, 8, 13};
|
||||
|
||||
@@ -187,7 +187,7 @@ NGRAPH_TEST(onnx_editor, shapes__modify_all_inputs)
|
||||
NGRAPH_TEST(onnx_editor, shapes__dynamic_rank_in_model)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/shapes__dynamic_rank_in_model.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/shapes__dynamic_rank_in_model.onnx")};
|
||||
|
||||
// input A in the model doesn't have the "shape" field meaning it has dynamic rank
|
||||
// it should still be possible to set such input's shape to some custom value
|
||||
@@ -204,7 +204,7 @@ NGRAPH_TEST(onnx_editor, shapes__dynamic_rank_in_model)
|
||||
NGRAPH_TEST(onnx_editor, shapes__set_dynamic_dimension)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape{Dimension::dynamic()};
|
||||
|
||||
@@ -219,7 +219,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_dynamic_dimension)
|
||||
NGRAPH_TEST(onnx_editor, shapes__set_mixed_dimensions)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape_A = PartialShape{21, Dimension::dynamic()};
|
||||
const auto new_shape_B = PartialShape{Dimension::dynamic(), 37};
|
||||
@@ -239,7 +239,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_mixed_dimensions)
|
||||
NGRAPH_TEST(onnx_editor, shapes__set_scalar_inputs)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape{};
|
||||
|
||||
@@ -258,7 +258,7 @@ NGRAPH_TEST(onnx_editor, shapes__set_scalar_inputs)
|
||||
NGRAPH_TEST(onnx_editor, shapes__static_to_dynamic_rank_substitution)
|
||||
{
|
||||
ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/shapes__add_two_inputs.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape::dynamic();
|
||||
|
||||
@@ -277,12 +277,12 @@ NGRAPH_TEST(onnx_editor, shapes__static_to_dynamic_rank_substitution)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge(1, 0)}}, {});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -292,14 +292,14 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut_ins_and_outs)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge(1, 0)}},
|
||||
{{OutputEdge(2, 0)}});
|
||||
|
||||
// expected to behave the same way as subgraph__linear_model_head_cut
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -309,13 +309,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_head_cut_ins_and_outs)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_head_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge(2, 0)}}, {});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/subgraph__linear_model_deeper_head_cut.prototxt");
|
||||
"onnx/model_editor/reference/subgraph__linear_model_deeper_head_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -325,12 +325,12 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_head_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -340,13 +340,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut_ins_and_outs)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{0, 0}}}, {{OutputEdge{1, 0}}});
|
||||
|
||||
// expected to behave the same way as subgraph__linear_model_tail_cut
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_tail_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -356,13 +356,13 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_tail_cut_ins_and_outs)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_with_initializer_tail_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/subgraph__linear_model_with_initializer_tail_cut.prototxt");
|
||||
"onnx/model_editor/reference/subgraph__linear_model_with_initializer_tail_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -372,14 +372,14 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_with_initializer_tail_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__initializer_without_matching_input_tail_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({}, {{OutputEdge{1, 0}}});
|
||||
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__initializer_without_matching_input_tail_cut.prototxt");
|
||||
"subgraph__initializer_without_matching_input_tail_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -389,13 +389,13 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_without_matching_input_tail_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_tail_cut)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({}, {{OutputEdge{0, 0}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/subgraph__linear_model_deeper_tail_cut.prototxt");
|
||||
"onnx/model_editor/reference/subgraph__linear_model_deeper_tail_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -405,7 +405,7 @@ NGRAPH_TEST(onnx_editor, subgraph__linear_model_deeper_tail_cut)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__no_input_params)
|
||||
{
|
||||
const auto model_path =
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt");
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx");
|
||||
|
||||
ONNXModelEditor editor{model_path};
|
||||
|
||||
@@ -419,14 +419,14 @@ NGRAPH_TEST(onnx_editor, subgraph__no_input_params)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head_with_initializer.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{0, 2}}},
|
||||
{{OutputEdge{0, 0}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/subgraph__initializer_to_input_replacement.prototxt");
|
||||
"onnx/model_editor/reference/subgraph__initializer_to_input_replacement.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -436,14 +436,14 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement_2)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__initializer_without_matching_input.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{0, 2}}},
|
||||
{{OutputEdge{0, 0}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/subgraph__initializer_to_input_replacement.prototxt");
|
||||
"onnx/model_editor/reference/subgraph__initializer_to_input_replacement.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -453,12 +453,12 @@ NGRAPH_TEST(onnx_editor, subgraph__initializer_to_input_replacement_2)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__multiout_op_output_edge)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({}, {{OutputEdge{5, 1}}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__multiout_op_output_edge.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__multiout_op_output_edge.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -468,7 +468,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiout_op_output_edge)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{1, 1}, InputEdge{2, 0}}},
|
||||
{{OutputEdge{4, 0}}});
|
||||
@@ -476,7 +476,7 @@ NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction)
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__existing_inputs_and_outputs_based_extraction.prototxt");
|
||||
"subgraph__existing_inputs_and_outputs_based_extraction.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -486,14 +486,14 @@ NGRAPH_TEST(onnx_editor, subgraph__existing_inputs_and_outputs_based_extraction)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__twice_input_edge_from_tensor_with_single_consumer)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({InputEdge{1, 1}}, {});
|
||||
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__twice_input_edge_from_tensor_with_single_consumer.prototxt");
|
||||
"subgraph__twice_input_edge_from_tensor_with_single_consumer.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -503,7 +503,7 @@ NGRAPH_TEST(onnx_editor, subgraph__twice_input_edge_from_tensor_with_single_cons
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{1, 0}, InputEdge{6, 0}}},
|
||||
{{OutputEdge{6, 0}, OutputEdge{4, 0}}});
|
||||
@@ -511,7 +511,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -521,7 +521,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_2)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{3, 0}, InputEdge{3, 1}}},
|
||||
{{OutputEdge{3, 0}, OutputEdge{4, 0}}});
|
||||
@@ -529,7 +529,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_2.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_2.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -539,7 +539,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_3)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{3, 0}, InputEdge{6, 0}}},
|
||||
{{OutputEdge{6, 0}, OutputEdge{5, 1}}});
|
||||
@@ -547,7 +547,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_3.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_3.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -557,14 +557,14 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_4)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{1, 0}, InputEdge{3, 0}}}, {});
|
||||
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_4.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_4.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -574,7 +574,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_5)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({InputEdge{3, 0}},
|
||||
{{OutputEdge{6,0}, OutputEdge{5, 1}}});
|
||||
@@ -583,7 +583,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_5.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_5.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -593,7 +593,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{1, 0, "new_name_1"}, InputEdge{6, 0, "new_name_2"}}},
|
||||
{{OutputEdge{6, 0}, OutputEdge{4, 0}}});
|
||||
@@ -601,7 +601,7 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names.prototxt");
|
||||
"subgraph__input_edge_from_tensor_with_multiple_consumers_custom_names.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -611,14 +611,14 @@ NGRAPH_TEST(onnx_editor, subgraph__input_edge_from_tensor_with_multiple_consumer
|
||||
NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_input_relu2)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{4, 0}}}, {});
|
||||
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__multiple_consumers_of_graph_input_relu2.prototxt");
|
||||
"subgraph__multiple_consumers_of_graph_input_relu2.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -628,14 +628,14 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_input_relu2)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{2, 0}}}, {});
|
||||
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__multiple_consumers_of_graph_initializer.prototxt");
|
||||
"subgraph__multiple_consumers_of_graph_initializer.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -645,7 +645,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{2, 0}, InputEdge{3, 0}}}, {});
|
||||
|
||||
@@ -653,7 +653,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2)
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__multiple_consumers_of_graph_initializer.prototxt");
|
||||
"subgraph__multiple_consumers_of_graph_initializer.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -663,14 +663,14 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_2)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_relu2_and_init)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{5, 0}, InputEdge{3, 0}}}, {});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__multiple_consumers_of_graph_initializer_relu2_and_init.prototxt");
|
||||
"subgraph__multiple_consumers_of_graph_initializer_relu2_and_init.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -680,7 +680,7 @@ NGRAPH_TEST(onnx_editor, subgraph__multiple_consumers_of_graph_initializer_relu2
|
||||
NGRAPH_TEST(onnx_editor, subgraph__invalid_edge_idx)
|
||||
{
|
||||
const auto model_path =
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt");
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx");
|
||||
|
||||
ONNXModelEditor editor{model_path};
|
||||
try
|
||||
@@ -699,7 +699,7 @@ NGRAPH_TEST(onnx_editor, subgraph__invalid_edge_idx)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__invalid_port_idx)
|
||||
{
|
||||
const auto model_path =
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt");
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx");
|
||||
|
||||
ONNXModelEditor editor{model_path};
|
||||
try
|
||||
@@ -718,7 +718,7 @@ NGRAPH_TEST(onnx_editor, subgraph__invalid_port_idx)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__inputs_getter)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
EXPECT_EQ(editor.model_inputs(),
|
||||
(std::vector<std::string>{"data_0", "conv1/7x7_s2_w_0", "conv1/7x7_s2_b_0"}));
|
||||
@@ -731,7 +731,7 @@ NGRAPH_TEST(onnx_editor, subgraph__inputs_getter)
|
||||
NGRAPH_TEST(onnx_editor, subgraph__custom_input_name_already_exist)
|
||||
{
|
||||
const auto model_path =
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt");
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx");
|
||||
|
||||
ONNXModelEditor editor{model_path};
|
||||
try
|
||||
@@ -752,7 +752,7 @@ NGRAPH_TEST(onnx_editor, subgraph__custom_input_name_already_exist)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
const InputEdge edge = editor.find_input_edge(EditorNode{EditorOutput{"conv1/7x7_s2_2"}},
|
||||
EditorInput{"conv1/7x7_s2_1"});
|
||||
@@ -768,7 +768,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_n
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
const InputEdge edge =
|
||||
editor.find_input_edge(EditorNode{EditorOutput{"conv1/7x7_s2_2"}}, EditorInput{0});
|
||||
@@ -789,7 +789,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_output_name_and_input_i
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
const InputEdge edge =
|
||||
editor.find_input_edge(EditorNode{"relu1"}, EditorInput{"conv1/7x7_s2_1"});
|
||||
@@ -805,7 +805,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_nam
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const InputEdge edge = editor.find_input_edge(EditorNode{"relu1_name"}, EditorInput{0});
|
||||
EXPECT_EQ(edge.m_node_idx, 0);
|
||||
@@ -819,7 +819,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_ind
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_index_custom_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const InputEdge edge = editor.find_input_edge(EditorNode{"relu1_name"}, EditorInput{0, "custom_input_name_1"});
|
||||
EXPECT_EQ(edge.m_node_idx, 0);
|
||||
@@ -835,7 +835,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_node_name_and_input_ind
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_empty_node_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -854,7 +854,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_empty_node_name)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const OutputEdge edge =
|
||||
editor.find_output_edge(EditorNode{EditorOutput{"mul2"}}, EditorOutput{"mul2"});
|
||||
@@ -881,7 +881,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name_and_output_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const OutputEdge edge =
|
||||
editor.find_output_edge(EditorNode{EditorOutput{"add2"}}, EditorOutput{0});
|
||||
@@ -902,7 +902,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_output_name_and_output
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const OutputEdge edge =
|
||||
editor.find_output_edge(EditorNode{"relu1_name"}, EditorOutput{"relu1"});
|
||||
@@ -918,7 +918,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_n
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const OutputEdge edge = editor.find_output_edge(EditorNode{"relu1_name"}, EditorOutput{0});
|
||||
EXPECT_EQ(edge.m_node_idx, 0);
|
||||
@@ -932,7 +932,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_node_name_and_output_i
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_edge_const_network)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
const InputEdge edge =
|
||||
editor.find_input_edge(EditorNode{EditorOutput{"relu4"}}, EditorInput{0});
|
||||
@@ -951,7 +951,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_edge_const_network)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_edge_error_handling)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
// node with given output name not found
|
||||
try
|
||||
@@ -1032,7 +1032,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_edge_error_handling)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_but_matched_input)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
InputEdge edge = editor.find_input_edge(EditorNode{"add_ambiguous_name"}, EditorInput{"in2"});
|
||||
EXPECT_EQ(edge.m_node_idx, 1);
|
||||
@@ -1046,7 +1046,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_but
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and_not_matched_input)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1074,7 +1074,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and_input_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1091,7 +1091,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_input_edge_by_ambiguous_node_name_and
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_but_matched_output)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const OutputEdge edge = editor.find_output_edge(EditorNode{"add_ambiguous_name"}, EditorOutput{"add1"});
|
||||
EXPECT_EQ(edge.m_node_idx, 1);
|
||||
@@ -1105,7 +1105,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_bu
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_the_same_node_name_and_output_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests_2.onnx")};
|
||||
|
||||
const OutputEdge edge = editor.find_output_edge(EditorNode{"add1"}, EditorOutput{0});
|
||||
EXPECT_EQ(edge.m_node_idx, 0);
|
||||
@@ -1119,7 +1119,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_the_same_node_name_and
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_and_not_matched_output)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1136,7 +1136,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_an
|
||||
NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_and_output_index)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1153,7 +1153,7 @@ NGRAPH_TEST(onnx_editor, editor_api_select_output_edge_by_ambiguous_node_name_an
|
||||
NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
// InputEdge{1, "in2"}
|
||||
const auto input_edge_1 = editor.find_input_edge(
|
||||
@@ -1171,7 +1171,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter)
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__existing_inputs_and_outputs_based_extraction.prototxt");
|
||||
"subgraph__existing_inputs_and_outputs_based_extraction.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -1196,7 +1196,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_names)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const auto input_edge_1 = editor.find_input_edge(
|
||||
EditorNode{EditorOutput{"mul2"}}, EditorInput{1, "new_name_1"});
|
||||
@@ -1208,7 +1208,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_nam
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__use_edge_mapper_with_graph_cutter_custom_names.prototxt");
|
||||
"subgraph__use_edge_mapper_with_graph_cutter_custom_names.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -1218,7 +1218,7 @@ NGRAPH_TEST(onnx_editor, editor_api_use_edge_mapper_with_graph_cutter_custom_nam
|
||||
NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
std::vector<InputEdge> output_consumers = editor.find_output_consumers("relu1");
|
||||
EXPECT_EQ(output_consumers.size(), 3);
|
||||
@@ -1245,7 +1245,7 @@ NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers_empty_result)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const std::vector<InputEdge> output_consumers = editor.find_output_consumers("not_existed");
|
||||
EXPECT_EQ(output_consumers.size(), 0);
|
||||
@@ -1254,7 +1254,7 @@ NGRAPH_TEST(onnx_editor, editor_api_find_output_consumers_empty_result)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_is_correct_and_unambiguous_node)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
bool is_correct_node = editor.is_correct_and_unambiguous_node(EditorNode{EditorOutput{"relu1"}});
|
||||
EXPECT_EQ(is_correct_node, true);
|
||||
@@ -1281,7 +1281,7 @@ NGRAPH_TEST(onnx_editor, editor_api_is_correct_and_unambiguous_node)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")};
|
||||
|
||||
const auto edge = editor.find_input_edge(EditorNode{EditorOutput{"Y"}}, EditorInput{1});
|
||||
editor.cut_graph_fragment({edge}, {});
|
||||
@@ -1289,7 +1289,7 @@ NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer)
|
||||
const auto ref_model =
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/model_editor/reference/"
|
||||
"subgraph__twice_input_edge_from_tensor_with_single_consumer.prototxt");
|
||||
"subgraph__twice_input_edge_from_tensor_with_single_consumer.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -1299,7 +1299,7 @@ NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer)
|
||||
NGRAPH_TEST(onnx_editor, editor_api_input_edge_from_tensor_with_single_consumer_ambiguous)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_ab.onnx")};
|
||||
|
||||
try
|
||||
{
|
||||
@@ -1318,7 +1318,7 @@ using TestEngine = test::INTERPRETER_Engine;
|
||||
NGRAPH_TEST(onnx_editor, values__append_one_initializer)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {1, 2}));
|
||||
@@ -1334,7 +1334,7 @@ NGRAPH_TEST(onnx_editor, values__append_one_initializer)
|
||||
NGRAPH_TEST(onnx_editor, values__append_two_initializers_to_invalid)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D_invalid.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D_invalid.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {4, 2}));
|
||||
@@ -1350,7 +1350,7 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_to_invalid)
|
||||
NGRAPH_TEST(onnx_editor, values__modify_one_initializer)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("B", op::Constant::create(element::i64, Shape{2}, {3, 4}));
|
||||
@@ -1365,7 +1365,7 @@ NGRAPH_TEST(onnx_editor, values__modify_one_initializer)
|
||||
NGRAPH_TEST(onnx_editor, values__modify_two_initializers)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {3, 6}));
|
||||
@@ -1381,7 +1381,7 @@ NGRAPH_TEST(onnx_editor, values__modify_two_initializers)
|
||||
NGRAPH_TEST(onnx_editor, values__no_inputs_modify_two_initializers)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers_only.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/add_1D_with_initializers_only.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("A", op::Constant::create(element::i64, Shape{2}, {1, 2}));
|
||||
@@ -1397,7 +1397,7 @@ NGRAPH_TEST(onnx_editor, values__no_inputs_modify_two_initializers)
|
||||
NGRAPH_TEST(onnx_editor, values__append_two_initializers_change_shape_type)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/model_editor/add_1D.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("A", op::Constant::create(element::i8, Shape{2, 1}, {-1, 1}));
|
||||
@@ -1413,7 +1413,7 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_change_shape_type)
|
||||
NGRAPH_TEST(onnx_editor, values__append_two_initializers_mixed_types)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gather_elements_float_3D_axis_2.onnx")};
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
in_vals.emplace("data",
|
||||
@@ -1430,14 +1430,14 @@ NGRAPH_TEST(onnx_editor, values__append_two_initializers_mixed_types)
|
||||
NGRAPH_TEST(onnx_editor, combined__cut_and_replace_shape)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph__inception_head.onnx")};
|
||||
|
||||
const auto new_shape = PartialShape({1, 64, 112, 112});
|
||||
editor.cut_graph_fragment({{InputEdge(1, 0)}}, {});
|
||||
editor.set_input_shapes({{"conv1/7x7_s2_1", new_shape}});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/subgraph__linear_model_head_cut.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -1451,12 +1451,12 @@ NGRAPH_TEST(onnx_editor, combined__cut_and_replace_shape)
|
||||
NGRAPH_TEST(onnx_editor, cut_operator_with_no_schema)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/unknown_input_value_info.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/unknown_input_value_info.onnx")};
|
||||
|
||||
editor.cut_graph_fragment({{InputEdge{1, 0}}}, {});
|
||||
|
||||
const auto ref_model = file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/unknown_input_value_info.prototxt");
|
||||
SERIALIZED_ZOO, "onnx/model_editor/reference/unknown_input_value_info.onnx");
|
||||
|
||||
const auto result = compare_onnx_models(editor.model_string(), ref_model);
|
||||
|
||||
@@ -1466,7 +1466,7 @@ NGRAPH_TEST(onnx_editor, cut_operator_with_no_schema)
|
||||
NGRAPH_TEST(onnx_editor, is_model_input)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
EXPECT_TRUE(editor.is_input(InputEdge{0, 0}));
|
||||
const auto edge1 = editor.find_input_edge(EditorOutput{"add1"}, 1);
|
||||
@@ -1485,7 +1485,7 @@ NGRAPH_TEST(onnx_editor, is_model_input)
|
||||
NGRAPH_TEST(onnx_editor, is_model_output)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
EXPECT_TRUE(editor.is_output(OutputEdge{4, 0}));
|
||||
EXPECT_TRUE(editor.is_output(OutputEdge{5, 1}));
|
||||
@@ -1502,7 +1502,7 @@ NGRAPH_TEST(onnx_editor, is_model_output)
|
||||
NGRAPH_TEST(onnx_editor, model_inputs)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const auto inputs = editor.model_inputs();
|
||||
EXPECT_TRUE(inputs == (std::vector<std::string>{"in1", "in2", "in3"})); // in4 is initializer
|
||||
@@ -1511,7 +1511,7 @@ NGRAPH_TEST(onnx_editor, model_inputs)
|
||||
NGRAPH_TEST(onnx_editor, model_inputs_with_non_input_initializers)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/instance_norm_dynamic.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/instance_norm_dynamic.onnx")};
|
||||
|
||||
const auto inputs = editor.model_inputs();
|
||||
EXPECT_TRUE(inputs == (std::vector<std::string>{"input"}));
|
||||
@@ -1520,7 +1520,7 @@ NGRAPH_TEST(onnx_editor, model_inputs_with_non_input_initializers)
|
||||
NGRAPH_TEST(onnx_editor, model_output)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
const auto outputs = editor.model_outputs();
|
||||
EXPECT_TRUE(outputs == (std::vector<std::string>{"mul1", "split2", "mul2"}));
|
||||
@@ -1529,7 +1529,7 @@ NGRAPH_TEST(onnx_editor, model_output)
|
||||
NGRAPH_TEST(onnx_editor, get_tensor_shape)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
EXPECT_EQ(editor.get_tensor_shape("mul2"), (PartialShape{1, 1, 2, 2}));
|
||||
EXPECT_EQ(editor.get_tensor_shape("in1"), (PartialShape{2, 2}));
|
||||
@@ -1553,7 +1553,7 @@ NGRAPH_TEST(onnx_editor, get_tensor_shape)
|
||||
NGRAPH_TEST(onnx_editor, get_tensor_shape_after_modification)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
EXPECT_EQ(editor.get_tensor_shape("in3"), (PartialShape{1, 1, 2, 2}));
|
||||
EXPECT_EQ(editor.get_tensor_shape("conv1"), (PartialShape{1, 1, 2, 2}));
|
||||
@@ -1566,7 +1566,7 @@ NGRAPH_TEST(onnx_editor, get_tensor_shape_after_modification)
|
||||
NGRAPH_TEST(onnx_editor, is_correct_tensor_name)
|
||||
{
|
||||
ONNXModelEditor editor{file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.prototxt")};
|
||||
SERIALIZED_ZOO, "onnx/model_editor/subgraph_extraction_tests.onnx")};
|
||||
|
||||
EXPECT_TRUE(editor.is_correct_tensor_name("in1"));
|
||||
EXPECT_TRUE(editor.is_correct_tensor_name("relu1"));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@ namespace
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/scatter_elements_opset11.onnx"));
|
||||
|
||||
test_constant_folding<float>(fn, {1.0, 1.1, 3.0, 2.1, 5.0}, Shape{1, 5});
|
||||
}
|
||||
@@ -64,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_scatter_elements)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_scalar)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_scalar.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_scalar.onnx"));
|
||||
|
||||
test_constant_folding<int64_t>(fn, {0}, Shape{1, 1});
|
||||
}
|
||||
@@ -72,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_scalar)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d.onnx"));
|
||||
|
||||
test_constant_folding<int64_t>(fn, {1, 2, 4}, Shape{1, 3});
|
||||
}
|
||||
@@ -80,7 +80,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d_float)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d_float.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_1d_float.onnx"));
|
||||
|
||||
test_constant_folding<int64_t>(fn, {0, 1, 3, 4, 5, 6, 7, 8, 9});
|
||||
}
|
||||
@@ -88,7 +88,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_1d_float)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_3d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_3d.onnx"));
|
||||
|
||||
// Vertical slices are 3D indices of non-zero elements in the input tensor
|
||||
// {0, 0, 0, 1, 1, 2, 2}
|
||||
@@ -101,7 +101,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_3d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_const_folding_model_non_zero_2d_bool)
|
||||
{
|
||||
const auto fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_2d_bool.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/non_zero_2d_bool.onnx"));
|
||||
|
||||
test_constant_folding<int64_t>(fn, {0, 1, 1, 0});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add.onnx"));
|
||||
|
||||
// Shape inference tests
|
||||
const auto& parameters = function->get_parameters();
|
||||
@@ -67,7 +67,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// termination condition
|
||||
@@ -84,7 +84,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// termination condition
|
||||
@@ -102,7 +102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/loop_2d_add_no_identity_termination_cond_static_shapes.prototxt"));
|
||||
"onnx/loop/loop_2d_add_no_identity_termination_cond_static_shapes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// termination condition
|
||||
@@ -119,7 +119,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_cond_false)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_false.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_no_identity_termination_cond_false.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -138,7 +138,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_termination_cond)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_no_identity_termination_cond.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// a_init
|
||||
@@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/loop_2d_add_const_no_identity_termination_cond_static_shapes.prototxt"));
|
||||
"onnx/loop/loop_2d_add_const_no_identity_termination_cond_static_shapes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -173,7 +173,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// trip count
|
||||
@@ -196,7 +196,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.prototxt"));
|
||||
"onnx/loop/loop_2d_add_cond_and_trip_count_as_inputs_static_shapes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// trip count
|
||||
@@ -217,7 +217,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_scope)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_initializer_from_parent_scope.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_initializer_from_parent_scope.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -232,7 +232,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_s
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_node_from_parent_scope.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_node_from_parent_scope.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -248,7 +248,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt"));
|
||||
"onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -267,7 +267,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scop
|
||||
try
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_incorrect_access_body_scope.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_incorrect_access_body_scope.onnx"));
|
||||
FAIL() << "Incorrect access to body scope not detected";
|
||||
}
|
||||
catch (const ngraph_error& e)
|
||||
@@ -285,7 +285,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_access_to_body_scop
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_parent_and_subgraph)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_the_same_name.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_the_same_name.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -299,7 +299,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -315,7 +315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_mul_opset1.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_mul_opset1.onnx"));
|
||||
|
||||
const auto parent_ops = function->get_ops();
|
||||
const auto loop_node_it =
|
||||
@@ -337,7 +337,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_the_proper_opset_in_subgraph)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_scalars_add.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_scalars_add.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -351,7 +351,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_scalars)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_cond.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_const_cond.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -365,7 +365,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_dynamic)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_dynamic.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_dynamic.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// trip count
|
||||
@@ -384,7 +384,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/onnx_controlflow_loop_2d_infer_types.prototxt"));
|
||||
"onnx/loop/onnx_controlflow_loop_2d_infer_types.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// trip count
|
||||
@@ -406,7 +406,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/loop/loop_add_node_from_parent_scope_infer_types.prototxt"));
|
||||
"onnx/loop/loop_add_node_from_parent_scope_infer_types.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// a_init
|
||||
@@ -426,7 +426,7 @@ NGRAPH_TEST(${BACKEND_NAME},
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_concat_values.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_concat_values.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// trip_count
|
||||
@@ -451,7 +451,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_concat_values)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skipped_shape_inference)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_and_cond_skipped.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_and_cond_skipped.onnx"));
|
||||
|
||||
const auto& results = function->get_results();
|
||||
EXPECT_EQ(results.size(), 2);
|
||||
@@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skippe
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_infinite.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_infinite.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// trip_count
|
||||
@@ -490,7 +490,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_infinite)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_outputs)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_no_variadic_inputs_and_outputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/loop/loop_no_variadic_inputs_and_outputs.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// trip_count
|
||||
@@ -506,7 +506,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_no_variadic_inputs_and_output
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_power)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_pow.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_pow.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
// trip_count
|
||||
|
||||
@@ -37,7 +37,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_padding)
|
||||
{
|
||||
// Convolution with strides=2 and padding=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_padding.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_padding.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
// data (1, 1, 7, 5) input tensor
|
||||
@@ -72,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_no_padding)
|
||||
{
|
||||
// Convolution with strides=2 and padding=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_no_padding.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_with_strides_no_padding.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
// data (1, 1, 7, 5) input tensor
|
||||
@@ -104,7 +104,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding)
|
||||
{
|
||||
// Convolution with strides=2 and padding=1
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/conv_with_strides_and_asymmetric_padding.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/conv_with_strides_and_asymmetric_padding.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
// data (1, 1, 7, 5) input tensor
|
||||
@@ -136,7 +136,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_strides_assymetric_padding)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_strides)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv2d_dilation_assym_pads_strides.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv2d_dilation_assym_pads_strides.onnx"));
|
||||
|
||||
// "", // auto_pad
|
||||
// vector<int64_t>{1, 1}, // dilations
|
||||
@@ -178,7 +178,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv2d_dilation_assymetric_pads_strides)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv3d_bias.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv3d_bias.onnx"));
|
||||
|
||||
// "", // auto_pad
|
||||
// vector<int64_t>{2, 2, 2}, // dilations
|
||||
@@ -294,7 +294,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv3d_bias)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_transpose_w_groups)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_transpose_w_groups.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_transpose_w_groups.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
inputs.emplace_back(std::vector<float>{
|
||||
@@ -316,7 +316,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d)
|
||||
{
|
||||
// Pooling with strides=2 and no padding
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d.onnx"));
|
||||
|
||||
// input data shape (1, 1, 4, 4)
|
||||
Inputs inputs;
|
||||
@@ -339,7 +339,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_average_pool_2d_pads)
|
||||
{
|
||||
// Pooling with strides=2 and padding=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d_pads.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/average_pool_2d_pads.onnx"));
|
||||
|
||||
// input data shape (1, 1, 4, 4)
|
||||
Inputs inputs;
|
||||
@@ -364,7 +364,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads)
|
||||
{
|
||||
// Pooling with strides=2 and padding=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/max_pool_2d_pads.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/max_pool_2d_pads.onnx"));
|
||||
|
||||
// input data shape (1, 1, 4, 4)
|
||||
Inputs inputs;
|
||||
@@ -388,7 +388,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_2d_pads)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p0.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p0.onnx"));
|
||||
|
||||
std::vector<std::int64_t> input{1, 0, -4, 0, 2, 1, -6, 1, 0, 0, 0, 0,
|
||||
-7, 1, -1, 0, -1, 8, 0, 10, 9, 0, 0, 5};
|
||||
@@ -404,7 +404,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p0)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p1.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p1.onnx"));
|
||||
|
||||
Inputs inputs{std::vector<float>(2 * 3 * 4)};
|
||||
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
|
||||
@@ -420,7 +420,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p1)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p2.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p2.onnx"));
|
||||
|
||||
Inputs inputs{std::vector<float>(2 * 3 * 4)};
|
||||
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
|
||||
@@ -436,7 +436,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p3.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_p3.onnx"));
|
||||
|
||||
Inputs inputs{std::vector<float>(2 * 3 * 4)};
|
||||
std::iota(std::begin(inputs.front()), std::end(inputs.front()), 0.f);
|
||||
@@ -452,7 +452,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_global_lp_pool_p3)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_output_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_output_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -467,7 +467,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_upper)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_upper.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_upper.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -495,7 +495,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_sam
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_same_lower)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_lower.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/convtranspose_output_shape_auto_pads_same_lower.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -523,7 +523,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_output_shape_auto_pads_sam
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_w_pads.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_w_pads.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -576,7 +576,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_w_pads)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_convtranspose_groups_pads_bias)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_pads_bias.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_groups_pads_bias.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynamic
|
||||
// the model represents a linear function A * x + B
|
||||
// where all 3 operands are model inputs (no initializers)
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.onnx"));
|
||||
|
||||
const auto& graph_inputs = function->get_parameters();
|
||||
EXPECT_EQ(graph_inputs.size(), 3);
|
||||
@@ -73,7 +73,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_onnx_dynamic_dims_to_ngraph_dynamic
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_ab_plus_c_inference)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/ab_plus_c.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -115,7 +115,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_scalar_initializers_shape_check)
|
||||
// initializers defined witout the "dims" field should produce Constants with an empty Shape
|
||||
// initializers with "dims: 0" should be have the same way (Shape{} not Shape{0})
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/scalar_initializers.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/scalar_initializers.onnx"));
|
||||
|
||||
for (auto ng_node : function->get_ordered_ops())
|
||||
{
|
||||
@@ -130,7 +130,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_check)
|
||||
{
|
||||
// the model contains a single Add operation that takes a fully dynamic input and a scalar
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx"));
|
||||
|
||||
const auto& graph_inputs = function->get_parameters();
|
||||
ASSERT_EQ(graph_inputs.size(), 2);
|
||||
@@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference)
|
||||
{
|
||||
// the model contains a single Add operation that takes a fully dynamic input and a scalar
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/a_plus_b_dyn_rank.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_dynamic_rank_input_inference)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{1, 3}, {1.0f, 2.5f, 4.3f});
|
||||
@@ -195,7 +195,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_1_3)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/acosh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{3, 2}, {1.0f, 2.5f, 4.3f, 1.0f, 2.5f, 4.3f});
|
||||
@@ -208,7 +208,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_acosh_3_2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{1, 3}, {-1.5f, 0.0f, 1.5f});
|
||||
@@ -220,7 +220,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_1_3)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/asinh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{3, 2}, {-1.5f, 0.0f, 1.5f, -1.5f, 0.0f, 1.5f});
|
||||
@@ -233,7 +233,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_asinh_3_2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{1, 3}, {-0.9f, 0.0f, 0.9f});
|
||||
@@ -245,7 +245,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_1_3)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/atanh_dyn_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{3, 2}, {-0.9f, 0.0f, 0.9f, -0.9f, 0.0f, 0.9f});
|
||||
@@ -258,7 +258,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_atanh_3_2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_batch.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_batch.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -281,7 +281,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_batch)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_bias.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/conv_with_dynamic_bias.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -304,7 +304,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_conv_with_dynamic_bias)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/average_pool_2d_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/average_pool_2d_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -324,7 +324,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_avg_pool_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_2d_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_2d_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -344,7 +344,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_with_indices_output.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_with_indices_output.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -369,7 +369,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_max_pool_with_indices_output)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/global_average_pool_dyn.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/global_average_pool_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -389,7 +389,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_avg_pool_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/global_max_pool_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/global_max_pool_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -409,7 +409,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_global_max_pool_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/argmax_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/argmax_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -429,7 +429,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_max_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/argmin_no_keep_dims_dyn.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/argmin_no_keep_dims_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -449,7 +449,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_arg_min_no_keep_dims_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_float_zeros.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_float_zeros.onnx"));
|
||||
|
||||
std::vector<float> expected_values(24, 0);
|
||||
|
||||
@@ -464,7 +464,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_float_zeros)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_int_ones.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/constant_of_shape_int_ones.onnx"));
|
||||
|
||||
std::vector<int32_t> expected_values(6, 1);
|
||||
|
||||
@@ -479,7 +479,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_constant_of_shape_int_ones)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -497,7 +497,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_1_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -514,7 +514,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_2_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -530,7 +530,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_3_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -546,7 +546,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_4_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -563,7 +563,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_5_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -581,7 +581,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_6_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_uint16_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/expand_uint16_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -597,7 +597,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_expand_uint16_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile)
|
||||
{
|
||||
auto function =
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tile.prototxt"));
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/tile.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<std::int16_t>({0, 1, 2, 3, 4, 5}); // input
|
||||
@@ -609,7 +609,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/tile_static.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/tile_static.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<std::int16_t>({0, 1, 2, 3, 4, 5}); // input
|
||||
@@ -621,7 +621,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_tile_static)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data)
|
||||
{
|
||||
auto ct_fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_data.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_data.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(ct_fn);
|
||||
|
||||
@@ -680,7 +680,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_data)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters)
|
||||
{
|
||||
auto ct_fn = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_filters.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/convtranspose_dyn_filters.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(ct_fn);
|
||||
|
||||
@@ -738,7 +738,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_convtranspose_dyn_filters)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_transpose)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/transpose.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/transpose.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
Shape shape{2, 2, 4, 3};
|
||||
@@ -775,7 +775,7 @@ namespace
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis0.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis0.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
const size_t RANKS_TO_TEST = 4;
|
||||
@@ -802,7 +802,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis_0)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_axis.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
const size_t RANKS_TO_TEST = 4;
|
||||
@@ -829,7 +829,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_axis)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_neg_axis.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/flatten_dyn_shape_neg_axis.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
const size_t RANKS_TO_TEST = 4;
|
||||
@@ -856,7 +856,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_flatten_neg_axis)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/flatten.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/flatten.onnx"));
|
||||
|
||||
std::vector<float> data{1, 2, 3, 4, 5, 6, 7, 8};
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
@@ -869,7 +869,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_flatten)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_dynamic_hw.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/global_lp_pool_dynamic_hw.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<int64_t>(Shape{1, 2, 3, 4}, {1, 0, -4, 0, 2, 1, -6, 1, 0, 0, 0, 0,
|
||||
@@ -882,7 +882,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_model_global_lp_dynamic_hw)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(std::vector<float>{1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -896,7 +896,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_2d_input)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>({1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -909,7 +909,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_steps)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_dyn_begin_end)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_default_steps_dyn_begin_end.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_default_steps_dyn_begin_end.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>({1, 2, 3, 4});
|
||||
@@ -922,7 +922,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_slice_2d_default_steps_dyn
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_steps.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(std::vector<float>{1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -935,7 +935,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_clamp_neg_ends)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -953,7 +953,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_neg_axes.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_neg_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -971,7 +971,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_neg_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_12_axes.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_12_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -988,7 +988,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_12_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_20_axes.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_20_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1006,7 +1006,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_3d_input_20_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1023,7 +1023,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_max)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_0231_axes_ends_max.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_0231_axes_ends_max.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1043,7 +1043,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_0231_axes_ends_ma
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_max)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_2103_axes.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_2103_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1064,7 +1064,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_2103_axes_ends_ma
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes_21_steps.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_4d_input_23_axes_21_steps.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1082,7 +1082,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_4d_input_23_axes_21_steps)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_axes.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_default_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1098,7 +1098,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_10_default_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_10_the_same_output_same)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_the_same_out_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_the_same_out_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(std::vector<float>{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f});
|
||||
@@ -1110,7 +1110,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_10_the_same_output_same)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/hardmax.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/hardmax.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(
|
||||
@@ -1146,7 +1146,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_hardmax)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_2.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/softmax_axis_2.onnx"));
|
||||
|
||||
const std::vector<float> input = {
|
||||
2.75793882, -0.50841322, 0.82013929, -0.62409912, -0.96136118, 0.21004745, 1.38337255,
|
||||
@@ -1184,7 +1184,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_model_softmax_axis_2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_positive_step)
|
||||
{
|
||||
const auto function =
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.prototxt"));
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1199,7 +1199,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_positive_step)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_negative_step)
|
||||
{
|
||||
const auto function =
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.prototxt"));
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/range.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1214,7 +1214,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_range_negative_step)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape.onnx"));
|
||||
|
||||
Shape data_shape{1, 2, 3, 4};
|
||||
std::vector<float> data(shape_size(data_shape));
|
||||
@@ -1236,7 +1236,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape2.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/instance_norm_dyn_shape2.onnx"));
|
||||
|
||||
Shape data_shape{1, 2, 3, 4};
|
||||
std::vector<float> data(shape_size(data_shape));
|
||||
@@ -1258,7 +1258,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2)
|
||||
// NGRAPH_TEST(${BACKEND_NAME}, onnx_upsample9_scales_input_nearest_infer)
|
||||
// {
|
||||
// const auto function = onnx_import::import_onnx_model(
|
||||
// file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_input_nearest.prototxt"));
|
||||
// file_util::path_join(SERIALIZED_ZOO, "onnx/upsample9_scales_input_nearest.onnx"));
|
||||
//
|
||||
// // Input data shape (1, 1, 2, 2)
|
||||
// // mode: nearest
|
||||
@@ -1276,7 +1276,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_instance_normalization_dyn_shape2)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input_opset1.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_input_opset1.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(std::vector<float>{1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -1287,7 +1287,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_2d_input)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_clamp_neg_ends_opset1.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_2d_clamp_neg_ends_opset1.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(std::vector<float>{1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -1298,7 +1298,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_clamp_neg_ends)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_slice_1_3d_input_21_axes_ends_max)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_21_axes_ends_max_opset1.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/slice_3d_input_21_axes_ends_max_opset1.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1315,7 +1315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat
|
||||
// the ReduceMax node has a fully dynamic input and the reduction axis is -1
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/dynamic_shapes/reduce_max_dynamic_input_rank_negative_axis.prototxt"));
|
||||
"onnx/dynamic_shapes/reduce_max_dynamic_input_rank_negative_axis.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{2, 4}, std::vector<float>{1, 2, 3, 4, 5, 6, 7, 8});
|
||||
@@ -1326,7 +1326,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_size_dyn_op)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/size_op_dyn.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/size_op_dyn.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{2, 3}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0});
|
||||
@@ -1337,7 +1337,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_size_dyn_op)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -1352,7 +1352,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/depth_to_space.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/depth_to_space.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
@@ -1370,7 +1370,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_dynamic_input)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_dynamic_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/space_to_depth.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/space_to_depth.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
|
||||
@@ -16,7 +16,7 @@ using namespace ngraph;
|
||||
TEST(onnx_importer, exception_throws_ngraph_error)
|
||||
{
|
||||
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt")),
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx")),
|
||||
ngraph_error);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ TEST(onnx_importer, exception_msg_ngraph_error)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx"));
|
||||
// Should have thrown, so fail if it didn't
|
||||
FAIL() << "ONNX Importer did not detected incorrect model!";
|
||||
}
|
||||
@@ -46,7 +46,7 @@ TEST(onnx_importer, exception_msg_onnx_node_validation_failure)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_bad_scale_type.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/instance_norm_bad_scale_type.onnx"));
|
||||
// Should have thrown, so fail if it didn't
|
||||
FAIL() << "ONNX Importer did not detected incorrect model!";
|
||||
}
|
||||
@@ -75,7 +75,7 @@ TEST(onnx_importer, exception_msg_std_err_wrapped)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/eye_link_dyn_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/eye_link_dyn_shape.onnx"));
|
||||
// Should have thrown, so fail if it didn't
|
||||
FAIL() << "ONNX Importer did not detected incorrect model!";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({1.f, 2.f, 3.f, 4.f});
|
||||
@@ -36,7 +36,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_from_stream)
|
||||
{
|
||||
std::string path =
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.prototxt");
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/external_data/external_data.onnx");
|
||||
std::ifstream stream{path, std::ios::in | std::ios::binary};
|
||||
ASSERT_TRUE(stream.is_open());
|
||||
const auto function = onnx_import::import_onnx_model(stream, path);
|
||||
@@ -50,10 +50,10 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_from_stream)
|
||||
stream.close();
|
||||
}
|
||||
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optinal_fields)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optional_fields)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_optional_fields.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_optional_fields.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({1.f, 2.f, 3.f, 4.f});
|
||||
@@ -65,7 +65,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_optinal_fields)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_in_different_paths)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_different_paths.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_different_paths.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// first input: {3.f}, second: {1.f, 2.f, 5.f} read from external files
|
||||
@@ -79,7 +79,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_two_tensors_data_in_the_same_file)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/external_data/external_data_two_tensors_data_in_the_same_file.prototxt"));
|
||||
"onnx/external_data/external_data_two_tensors_data_in_the_same_file.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// first input: {3, 2, 1}, second: {1, 2, 3} read from external file
|
||||
@@ -94,7 +94,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_external_data_exception)
|
||||
try
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_file_not_found.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_file_not_found.onnx"));
|
||||
FAIL() << "Incorrect path to external data not detected";
|
||||
}
|
||||
catch (const ngraph_error& error)
|
||||
@@ -116,7 +116,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_up_dir_path)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/external_data/inner_scope/external_data_file_in_up_dir.prototxt"));
|
||||
"onnx/external_data/inner_scope/external_data_file_in_up_dir.onnx"));
|
||||
FAIL() << "Incorrect path to external data not detected";
|
||||
}
|
||||
catch (const ngraph_error& error)
|
||||
@@ -135,7 +135,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_external_invalid_up_dir_path)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_external_data_sanitize_path)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_sanitize_test.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/external_data/external_data_sanitize_test.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({1.f, 2.f, 3.f, 4.f});
|
||||
|
||||
@@ -53,7 +53,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_prior_box)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/prior_box.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/prior_box.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
std::vector<float> A(3 * 2 * 2);
|
||||
std::vector<float> B(3 * 6 * 6);
|
||||
@@ -78,7 +78,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_prior_box)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/priorbox_clustered.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/priorbox_clustered.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
std::vector<float> A{15.0};
|
||||
@@ -96,7 +96,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_most_attrs_default)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_most_attrs_default.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_most_attrs_default.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
std::vector<float> A(1 * 1 * 2 * 1);
|
||||
@@ -130,7 +130,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_first_input_bad_shape)
|
||||
try
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_first_input_bad_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_first_input_bad_shape.onnx"));
|
||||
FAIL() << "Expected exception was not thrown";
|
||||
}
|
||||
catch (const ngraph::ngraph_error& e)
|
||||
@@ -150,7 +150,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape)
|
||||
try
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_second_input_bad_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/priorbox_clustered_second_input_bad_shape.onnx"));
|
||||
FAIL() << "Expected exception was not thrown";
|
||||
}
|
||||
catch (const ngraph::ngraph_error& e)
|
||||
@@ -168,7 +168,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_priorbox_clustered_second_input_bad_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_detection_output)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/detection_output.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/detection_output.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
auto gen_vector = [](size_t size, float min, float max) -> std::vector<float> {
|
||||
@@ -199,7 +199,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_detection_output)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
Shape shape{2, 8, 2, 2};
|
||||
int size = shape_size(shape);
|
||||
@@ -224,7 +224,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm_5d)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm_5d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm_5d.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
Shape shape{2, 8, 1, 2, 1};
|
||||
int size = shape_size(shape);
|
||||
@@ -247,7 +247,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm_5d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_normalize)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/normalize.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/normalize.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
std::vector<float> data(12);
|
||||
std::iota(data.begin(), data.end(), 1);
|
||||
@@ -273,7 +273,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_normalize)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/swish_with_beta.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/swish_with_beta.onnx"));
|
||||
|
||||
const Shape expected_output_shape{3};
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
@@ -287,7 +287,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_with_beta)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_swish_without_beta)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/swish_without_beta.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/swish_without_beta.onnx"));
|
||||
|
||||
const Shape expected_output_shape{3};
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
@@ -302,7 +302,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/detection_output.prototxt"));
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/detection_output.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// rois
|
||||
@@ -366,7 +366,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_detection_output_
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/"
|
||||
"detection_output_most_attrs_default.prototxt"));
|
||||
"detection_output_most_attrs_default.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// rois
|
||||
@@ -413,7 +413,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_proposal
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO,
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/"
|
||||
"generate_proposals_single_image.prototxt"));
|
||||
"generate_proposals_single_image.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// im_info
|
||||
@@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_generate_proposal
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_group_norm)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/group_norm.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/group_norm.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
Shape shape{2, 8, 2, 2};
|
||||
@@ -495,7 +495,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_prior_grid_genera
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/prior_grid_generator.prototxt"));
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/prior_grid_generator.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -522,7 +522,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_extra
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO,
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/roi_feature_extractor.prototxt"));
|
||||
"onnx/org.openvinotoolkit/experimental_detectron/roi_feature_extractor.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -580,7 +580,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_roi_feature_extra
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/topk_rios.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/experimental_detectron/topk_rios.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
|
||||
@@ -594,7 +594,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_experimental_detectron_topk_rios)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_deformable_conv_2d)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/deformable_conv_2d.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/org.openvinotoolkit/deformable_conv_2d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ static std::string s_manifest = "${MANIFEST}";
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tag_text)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_tag_add.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_tag_add.onnx"));
|
||||
|
||||
const auto ng_nodes = function->get_ordered_ops();
|
||||
for (auto ng_node : ng_nodes)
|
||||
@@ -60,7 +60,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_only_output)
|
||||
// the Add node in the model does not have a name,
|
||||
// only its output name should be found in the provenance tags
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_only_outputs.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_only_outputs.onnx"));
|
||||
test_provenance_tags<default_opset::Add>(function, "<ONNX Add (-> output_of_add)>");
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_node_name_and_outputs)
|
||||
test::ProvenanceEnabler provenance_enabler;
|
||||
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_node_name_and_outputs.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_node_name_and_outputs.onnx"));
|
||||
test_provenance_tags<default_opset::Add>(function, "<ONNX Add (Add_node -> output_of_add)>");
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_multiple_outputs_op)
|
||||
test::ProvenanceEnabler provenance_enabler;
|
||||
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_multiple_outputs_op.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_multiple_outputs_op.onnx"));
|
||||
test_provenance_tags<default_opset::TopK>(function, "<ONNX TopK (TOPK -> values, indices)>");
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tagging_constants)
|
||||
test::ProvenanceEnabler provenance_enabler;
|
||||
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.onnx"));
|
||||
test_provenance_tags<default_opset::Constant>(function,
|
||||
"<ONNX Input (initializer_of_A) Shape:{1}>");
|
||||
}
|
||||
@@ -97,6 +97,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tagging_parameters)
|
||||
test::ProvenanceEnabler provenance_enabler;
|
||||
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.onnx"));
|
||||
test_provenance_tags<default_opset::Parameter>(function, "<ONNX Input (input_B) Shape:{}>");
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ using Outputs = std::vector<std::vector<float>>;
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero_p)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<float>{32.25f, 48.34f, 50.f, 83.f});
|
||||
@@ -48,7 +48,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_const_scale_const_zero_p
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<float>{32.25f, 48.34f, 50.f, 83.f});
|
||||
@@ -61,7 +61,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_zero_point.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_zero_point.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<float>{0.f, 2.f, 3.f, 1000.f, -254.f, -1000.f}); // x
|
||||
@@ -76,7 +76,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_zero_point)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_zero.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_zero.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<float>{
|
||||
@@ -95,7 +95,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_zero)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_negative.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quantize_linear_axis_negative.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<float>{
|
||||
@@ -114,7 +114,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quantize_linear_axis_negative)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequant_lin.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequant_lin.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<std::uint8_t>{19, 210, 21, 10});
|
||||
@@ -126,7 +126,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zero_point)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale_and_zero_point.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale_and_zero_point.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<std::uint8_t>{19, 210, 21, 10}); // x
|
||||
@@ -140,7 +140,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale_and_zero_
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_scale.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<std::uint8_t>{19, 210, 21, 10}); // x
|
||||
@@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_scale)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_inputs.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_inputs.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<std::uint8_t>{19}); // x
|
||||
@@ -168,7 +168,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_inputs)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_zero_point.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_scalar_zero_point.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<std::uint8_t>{19, 210, 21, 10}); // x
|
||||
@@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_point)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_uint8)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_0.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_0.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input(std::vector<uint8_t>{0, 3, 128, 255}); // x
|
||||
@@ -197,7 +197,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_uint
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_int8)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_1.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_1.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -212,7 +212,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_scalar_zero_scale_int8
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_2.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_2.onnx"));
|
||||
|
||||
auto test_case = ngraph::test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -230,7 +230,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_3.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_3.onnx"));
|
||||
|
||||
auto test_case = ngraph::test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -248,7 +248,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_4.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_4.onnx"));
|
||||
|
||||
auto test_case = ngraph::test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -272,7 +272,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_int8_4d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_negative_axis)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_5.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dequantize_linear_5.onnx"));
|
||||
|
||||
auto test_case = ngraph::test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -290,7 +290,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_dequantize_linear_1d_zero_scale_uint8_ne
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quant_conv_lin.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/quant_conv_lin.onnx"));
|
||||
|
||||
std::vector<std::vector<std::uint8_t>> inputs;
|
||||
inputs.emplace_back(std::vector<std::uint8_t>{
|
||||
@@ -313,7 +313,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_2d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_2d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -334,7 +334,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_2d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_3d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_conv_3d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -355,7 +355,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_matmul_3d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -380,7 +380,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
test_case.add_input(std::vector<uint8_t>{2, 3, 4, 5, 6, 7, 8, 9, 10}); // x
|
||||
@@ -394,7 +394,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_zero_point_zero)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
test_case.add_input(std::vector<uint8_t>{1, 2, 3, 4, 5, 6, 7, 8, 9}); // x
|
||||
@@ -408,7 +408,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_zero_point_zero)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_no_zero_point.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_no_zero_point.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
test_case.add_input(std::vector<uint8_t>{1, 2, 3, 4, 5, 6, 7, 8, 9}); // x
|
||||
@@ -421,7 +421,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_no_zero_point)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_pads)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_pads.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/conv_integer_pads.onnx"));
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
test_case.add_input(std::vector<uint8_t>{2, 3, 4, 5, 6, 7, 8, 9, 10}); // x
|
||||
@@ -437,7 +437,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_pads)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.onnx"));
|
||||
|
||||
const Shape expected_output_shape{1, 2, 3, 4};
|
||||
EXPECT_EQ(function->get_output_size(), 1);
|
||||
@@ -449,7 +449,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_const_inputs.onnx"));
|
||||
|
||||
const Shape data_shape{1, 2, 3, 4};
|
||||
const auto n_elements = shape_size(data_shape);
|
||||
@@ -468,7 +468,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_const_inputs_infer)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_nonconst_inputs_infer)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_nonconst_inputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/quantization/fake_quantize_nonconst_inputs.onnx"));
|
||||
|
||||
const Shape data_shape{1, 2, 3, 4};
|
||||
const size_t n_elements = shape_size(data_shape);
|
||||
|
||||
@@ -35,7 +35,7 @@ using Outputs = std::vector<std::vector<float>>;
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reduced_dims.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reduced_dims.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -57,7 +57,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reduced_dims)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reordered_dims.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_reordered_dims.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -80,7 +80,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_reordered_dims)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_extended_dims.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_extended_dims.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -102,7 +102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_extended_dims)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_single_dim)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_single_dim.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_single_dim.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -124,7 +124,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim)
|
||||
{
|
||||
// the model contains the target shape in the initializers: [2, -1, 2]
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_dim.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_dim.onnx"));
|
||||
|
||||
// 2x3x4
|
||||
auto input = test::NDArray<float, 3>({{{0.5488135, 0.71518934, 0.60276335, 0.5448832},
|
||||
@@ -161,7 +161,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_dim)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_with_zero_dims.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_negative_with_zero_dims.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -183,7 +183,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_negative_with_zero_dim)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_output_shape_as_input.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/reshape_output_shape_as_input.onnx"));
|
||||
|
||||
// input data shape (2, 3, 4)
|
||||
auto input = test::NDArray<float, 3>({{{0, 1, 2, 3}, {4, 5, 6, 7}, {8, 9, 10, 11}},
|
||||
@@ -205,7 +205,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_reshape_output_shape_as_input)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
@@ -223,7 +223,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_v1.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_v1.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
@@ -241,7 +241,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_v1)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_crd)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_crd.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_crd.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
@@ -262,7 +262,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_blocksize)
|
||||
// This model fails to import since the depth channel length must be a multiple of the
|
||||
// `blocksize` attribute value.
|
||||
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.prototxt")),
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_bad_blocksize.onnx")),
|
||||
std::runtime_error);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_no_blocksize)
|
||||
{
|
||||
// This model fails to import since it lacks of required parameter `blocksize`.
|
||||
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_no_blocksize.prototxt")),
|
||||
SERIALIZED_ZOO, "onnx/depth_to_space_no_blocksize.onnx")),
|
||||
std::runtime_error);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_mode)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_mode.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_mode.onnx"));
|
||||
FAIL() << "The onnx_importer did not throw for unknown mode to DepthToSpace op";
|
||||
}
|
||||
catch (const ngraph::ngraph_error& e)
|
||||
@@ -298,7 +298,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_input_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/depth_to_space_bad_input_shape.onnx"));
|
||||
FAIL() << "The onnx_importer did not throw for invalid input shape to DepthToSpace op";
|
||||
}
|
||||
catch (const ngraph::ngraph_error& e)
|
||||
@@ -315,7 +315,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_depth_to_space_bad_input_shape)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/space_to_depth.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/space_to_depth.onnx"));
|
||||
|
||||
std::vector<float> input(32);
|
||||
std::iota(input.begin(), input.end(), 0);
|
||||
@@ -336,7 +336,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_invalid_input_shape)
|
||||
try
|
||||
{
|
||||
onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_invalid_input_shape.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_invalid_input_shape.onnx"));
|
||||
FAIL() << "Expected ngraph_error exception, but no exception was thrown";
|
||||
}
|
||||
catch (const ngraph::ngraph_error& e)
|
||||
@@ -357,7 +357,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_bad_blocksize)
|
||||
// This model fails to import since the depth channel length must be a multiple of the
|
||||
// `blocksize` attribute value.
|
||||
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_bad_blocksize.prototxt")),
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_bad_blocksize.onnx")),
|
||||
std::runtime_error);
|
||||
}
|
||||
|
||||
@@ -365,14 +365,14 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_space_to_depth_no_blocksize)
|
||||
{
|
||||
// This model fails to import since it lacks of required `blocksize` attribute.
|
||||
EXPECT_THROW(onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_no_blocksize.prototxt")),
|
||||
SERIALIZED_ZOO, "onnx/space_to_depth_no_blocksize.onnx")),
|
||||
std::runtime_error);
|
||||
}
|
||||
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze.onnx"));
|
||||
|
||||
// {1, 4, 1, 1, 2}
|
||||
auto input = test::NDArray<float, 5>(
|
||||
@@ -393,7 +393,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes)
|
||||
{
|
||||
const auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze_opset13_no_axes.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/squeeze_opset13_no_axes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
const std::vector<float> data = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f};
|
||||
@@ -405,7 +405,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_squeeze_opset13_no_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze.onnx"));
|
||||
|
||||
auto input = test::NDArray<float, 3>(
|
||||
{{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}},
|
||||
@@ -429,7 +429,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze_negative_axes.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/unsqueeze_negative_axes.onnx"));
|
||||
|
||||
auto input = test::NDArray<float, 4>(
|
||||
{{{{-1.8427763f, -1.0467733f, 0.50550157f, 1.4897262f, 0.33057404f}},
|
||||
@@ -453,7 +453,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsqueeze_negative_axes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/concat.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/concat.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
|
||||
@@ -471,7 +471,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/concat_negative_axis.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/concat_negative_axis.onnx"));
|
||||
|
||||
Inputs inputs;
|
||||
|
||||
@@ -489,7 +489,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_concat_negative_axis)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_default)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.onnx"));
|
||||
|
||||
Inputs inputs{{1, 2, 3, 4, 5, 6}};
|
||||
Outputs expected_outputs{{1, 2}, {3, 4}, {5, 6}};
|
||||
@@ -508,7 +508,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_equal_parts_2d)
|
||||
{
|
||||
// Split into 2 equal parts along axis=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_2d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_2d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11});
|
||||
@@ -521,7 +521,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d)
|
||||
{
|
||||
// Split into variable parts {2, 4} along axis=1
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_variable_parts_2d.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_variable_parts_2d.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11});
|
||||
@@ -533,7 +533,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_split_variable_parts_2d)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_expand_static_shape)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/expand_static_shape.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/expand_static_shape.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
// input data shape (3,1)
|
||||
|
||||
@@ -34,7 +34,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_default_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_default_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -50,7 +50,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_default_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -66,7 +66,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -91,7 +91,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_clip_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_clip_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -107,7 +107,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -138,7 +138,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_mixed_seq_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_reverse_mixed_seq_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926, 1.1405563, -0.03931177, -0.03759607}); // X
|
||||
@@ -169,7 +169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_reverse_mixed_seq_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_mixed_seq_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bidir_mixed_seq_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({0.68172926,
|
||||
@@ -223,7 +223,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bidir_mixed_seq_const)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_with_clip_peepholes.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_with_clip_peepholes.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>({-0.455351, -0.276391, -0.185934, -0.269585}); // X
|
||||
@@ -291,7 +291,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_with_clip_peepholes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_mixed_seq.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
int hidden_size{3};
|
||||
@@ -330,7 +330,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_mixed_seq)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_hardsigmoid_activation.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_hardsigmoid_activation.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -386,7 +386,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_hardsigmoid_activation)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_large_batch_no_clip.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_fwd_large_batch_no_clip.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -431,7 +431,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_fwd_large_batch_no_clip)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bdir_short_input_seq.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_bdir_short_input_seq.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -491,7 +491,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_bdir_short_input_seq_peepholes)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_mixed_seq_reverse.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_mixed_seq_reverse.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -536,7 +536,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_mixed_seq_reverse)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_inputs)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq.onnx"));
|
||||
|
||||
auto batch_size = Dimension::dynamic();
|
||||
auto seq_length = Dimension::dynamic();
|
||||
@@ -557,7 +557,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_i
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inputs)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.onnx"));
|
||||
|
||||
auto batch_size = Dimension::dynamic();
|
||||
auto seq_length = Dimension::dynamic();
|
||||
@@ -578,7 +578,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inp
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_dynamic_batch_size_and_seq_len)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_dynamic_batch_size_and_seq_len.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_dynamic_batch_size_and_seq_len.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>({1, 2, 3, 4, 5, 6});
|
||||
@@ -707,7 +707,7 @@ protected:
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -752,7 +752,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_defaults_fwd.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -801,7 +801,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_con
|
||||
{
|
||||
// activations: relu, sigmoid
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_sigmoid_const.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_sigmoid_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -843,7 +843,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_rel
|
||||
{
|
||||
// activations: relu, hardsigmoid
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_hardsigmoid.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_activations_relu_hardsigmoid.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -891,7 +891,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_activations_rel
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -942,7 +942,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -985,7 +985,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_mixed_seq_len_c
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1027,7 +1027,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_mixed_seq_l
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidir_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidir_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1072,7 +1072,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidir_mixed_seq_len
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1120,7 +1120,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_rev_clip_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1165,7 +1165,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_rev_clip_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1210,7 +1210,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_reverse.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1258,7 +1258,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_reverse)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1303,7 +1303,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h_
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_bias_initial_h.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1353,7 +1353,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_bias_initial_h)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1399,7 +1399,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional_const
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_bidirectional.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1448,7 +1448,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_bidirectional)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1493,7 +1493,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_r
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_reset)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/gru_fwd_linear_before_reset.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1542,7 +1542,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_fwd_linear_before_r
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const_dynamic)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{4, 3, 2}, in_X);
|
||||
@@ -1587,7 +1587,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const_
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_import_only_gru_defaults_fwd_const_dynamic)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/gru_defaults_fwd_const_dynamic.onnx"));
|
||||
|
||||
auto batch_size = Dimension::dynamic();
|
||||
auto seq_length = Dimension::dynamic();
|
||||
@@ -1694,7 +1694,7 @@ protected:
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1739,7 +1739,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_defaults_fwd.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1787,7 +1787,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1833,7 +1833,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations_con
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_activations.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1881,7 +1881,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_activations)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -1926,7 +1926,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len_c
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_mixed_seq_len.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -1977,7 +1977,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_mixed_seq_len)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -2018,7 +2018,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_mixed_seq_l
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_len_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidir_mixed_seq_len_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidir_mixed_seq_len_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -2065,7 +2065,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidir_mixed_seq_len
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -2110,7 +2110,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_rev_clip.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -2158,7 +2158,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_rev_clip)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -2203,7 +2203,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse_const)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_reverse.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -2251,7 +2251,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_reverse)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
test_case.add_input<float>(in_X);
|
||||
@@ -2296,7 +2296,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h_
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_fwd_bias_initial_h.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -2346,7 +2346,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_fwd_bias_initial_h)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -2395,7 +2395,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional)
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_const)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional_const.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/rnn_bidirectional_const.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine>(function);
|
||||
|
||||
@@ -2442,7 +2442,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_bidirectional_const
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const_dynamic)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx"));
|
||||
|
||||
auto test_case = test::TestCase<TestEngine, test::TestCaseType::DYNAMIC>(function);
|
||||
test_case.add_input<float>(Shape{4, 3, 2}, in_X);
|
||||
@@ -2487,7 +2487,7 @@ NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const_
|
||||
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_import_only_rnn_defaults_fwd_const_dynamic)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(file_util::path_join(
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.prototxt"));
|
||||
SERIALIZED_ZOO, "onnx/dynamic_shapes/rnn_defaults_fwd_const_dynamic.onnx"));
|
||||
|
||||
auto batch_size = Dimension::dynamic();
|
||||
auto seq_length = Dimension::dynamic();
|
||||
|
||||
@@ -28,7 +28,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME});
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_0)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_0.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_0.onnx")};
|
||||
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
@@ -46,7 +46,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_0)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_1)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_1.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_1.onnx")};
|
||||
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
@@ -64,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_axis_1)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_default_axis)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_default_axis.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_default_axis.onnx")};
|
||||
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
@@ -82,7 +82,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_default_axis)
|
||||
NGRAPH_TEST(${BACKEND_NAME}, onnx_compress_negative_axis)
|
||||
{
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_negative_axis.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/compress_negative_axis.onnx")};
|
||||
|
||||
std::map<std::string, std::shared_ptr<ngraph::op::Constant>> in_vals;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ using Outputs = std::vector<std::vector<float>>;
|
||||
NGRAPH_TEST(onnx_tensor_names, simple_model)
|
||||
{
|
||||
auto function = onnx_import::import_onnx_model(
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/tensor_names.prototxt"));
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/tensor_names.onnx"));
|
||||
|
||||
auto ops = function->get_ordered_ops();
|
||||
ASSERT_EQ(ops[0]->get_friendly_name(), "input");
|
||||
@@ -43,7 +43,7 @@ NGRAPH_TEST(onnx_tensor_names, simple_model)
|
||||
NGRAPH_TEST(onnx_tensor_names, node_multiple_outputs)
|
||||
{
|
||||
auto function =
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.prototxt"));
|
||||
onnx_import::import_onnx_model(file_util::path_join(SERIALIZED_ZOO, "onnx/top_k.onnx"));
|
||||
|
||||
auto ops = function->get_ordered_ops();
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_add_abc_set_precission)
|
||||
const element::Type ng_type = element::from<DataType>();
|
||||
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_3d.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/add_abc_3d.onnx")};
|
||||
|
||||
editor.set_input_types({{"A", ng_type}, {"B", ng_type}, {"C", ng_type}});
|
||||
|
||||
@@ -56,7 +56,7 @@ TYPED_TEST_P(ElemTypesTests, onnx_test_split_multioutput_set_precission)
|
||||
const element::Type ng_type = element::from<DataType>();
|
||||
|
||||
onnx_editor::ONNXModelEditor editor{
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.prototxt")};
|
||||
file_util::path_join(SERIALIZED_ZOO, "onnx/split_equal_parts_default.onnx")};
|
||||
|
||||
editor.set_input_types({{"input", ng_type}});
|
||||
|
||||
|
||||
@@ -3,4 +3,6 @@ paddlepaddle==2.1.0
|
||||
gast==0.3.3
|
||||
numpy~=1.19.2
|
||||
six~=1.15.0
|
||||
|
||||
# ONNX - generate test models
|
||||
docopt~=0.6.2
|
||||
onnx~=1.9.0
|
||||
4
ngraph/test/requirements_test_onnx.txt
Normal file
4
ngraph/test/requirements_test_onnx.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
# ONNX - generate test models
|
||||
docopt~=0.6.2
|
||||
onnx~=1.9.0
|
||||
protobuf>=3.9
|
||||
Reference in New Issue
Block a user