[CORE][Unite Test][Warning Fix] core unite test warning (#13757)
* [CORE][Unite test] Fix conflicts Signed-off-by: Xuejun Zhai <Xuejun.Zhai@intel.com> * [CORE][Unite Test] clear cmake Signed-off-by: Xuejun Zhai <Xuejun.Zhai@intel.com> Signed-off-by: Xuejun Zhai <Xuejun.Zhai@intel.com> Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
This commit is contained in:
parent
9d41136457
commit
cda2df8736
@ -219,8 +219,8 @@ void divide_floor(const DimType& dividend, const typename DimType::value_type& d
|
|||||||
if (dividend.get_max_length() == -1) {
|
if (dividend.get_max_length() == -1) {
|
||||||
quotient = -1;
|
quotient = -1;
|
||||||
} else {
|
} else {
|
||||||
auto lb = floor(1. * dividend.get_min_length() / divisor);
|
auto lb = static_cast<size_t>(floor(1. * dividend.get_min_length() / divisor));
|
||||||
auto ub = floor(1. * dividend.get_max_length() / divisor);
|
auto ub = static_cast<size_t>(floor(1. * dividend.get_max_length() / divisor));
|
||||||
quotient = DimType(lb, ub);
|
quotient = DimType(lb, ub);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT ENABLE_SANITIZER)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|
||||||
ie_add_compiler_flags(/wd4305)
|
|
||||||
ie_add_compiler_flags(/wd4244)
|
|
||||||
ie_add_compiler_flags(/wd4267)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\")
|
add_definitions(-DSERIALIZED_ZOO=\"${TEST_MODEL_ZOO}/core/models\")
|
||||||
|
|
||||||
if(NOT ENABLE_OV_CORE_UNIT_TESTS)
|
if(NOT ENABLE_OV_CORE_UNIT_TESTS)
|
||||||
|
@ -1783,7 +1783,7 @@ TEST(constant, DISABLED_nightly_huge_size_4GB) {
|
|||||||
size_t s = start + 5;
|
size_t s = start + 5;
|
||||||
std::vector<uint8_t> data(s);
|
std::vector<uint8_t> data(s);
|
||||||
for (size_t i = start; i < s; i++) {
|
for (size_t i = start; i < s; i++) {
|
||||||
data[i] = i - start + 42;
|
data[i] = static_cast<uint8_t>(i - start + 42);
|
||||||
}
|
}
|
||||||
Shape shape{s};
|
Shape shape{s};
|
||||||
op::Constant c(element::u8, shape, data.data());
|
op::Constant c(element::u8, shape, data.data());
|
||||||
|
@ -784,10 +784,10 @@ TEST(eval, evaluate_relu_2Ffprop_f32) {
|
|||||||
auto result = make_shared<HostTensor>();
|
auto result = make_shared<HostTensor>();
|
||||||
ASSERT_TRUE(fun->evaluate(
|
ASSERT_TRUE(fun->evaluate(
|
||||||
{result},
|
{result},
|
||||||
{make_host_tensor<element::Type_t::f32>(Shape{2, 5}, {1, 8, -8, 17, -0.5, 0.1, 8.5, -8, 17, -0.5})}));
|
{make_host_tensor<element::Type_t::f32>(Shape{2, 5}, {1, 8, -8, 17, -0.5f, 0.1f, 8.5f, -8, 17, -0.5f})}));
|
||||||
EXPECT_EQ(result->get_element_type(), element::f32);
|
EXPECT_EQ(result->get_element_type(), element::f32);
|
||||||
auto result_val = read_vector<float>(result);
|
auto result_val = read_vector<float>(result);
|
||||||
vector<float> expec{1, 8, 0, 17, 0, 0.1, 8.5, 0, 17, 0};
|
vector<float> expec{1, 8, 0, 17, 0, 0.1f, 8.5f, 0, 17, 0};
|
||||||
ASSERT_EQ(result_val, expec);
|
ASSERT_EQ(result_val, expec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1809,7 +1809,7 @@ TEST(eval, evaluate_softsign_9) {
|
|||||||
EXPECT_EQ(result_tensor[0].get_element_type(), ov::element::f32);
|
EXPECT_EQ(result_tensor[0].get_element_type(), ov::element::f32);
|
||||||
EXPECT_EQ(result_tensor[0].get_shape(), ov::Shape{4});
|
EXPECT_EQ(result_tensor[0].get_shape(), ov::Shape{4});
|
||||||
|
|
||||||
vector<float> out{0.5, -0.5, 0.714285, -0.777777};
|
vector<float> out{0.5f, -0.5f, 0.714285f, -0.777777f};
|
||||||
auto result_data = result_tensor[0].data<float>();
|
auto result_data = result_tensor[0].data<float>();
|
||||||
for (size_t i = 0; i < result_tensor[0].get_size(); ++i)
|
for (size_t i = 0; i < result_tensor[0].get_size(); ++i)
|
||||||
EXPECT_NEAR(result_data[i], out[i], 1e-6F);
|
EXPECT_NEAR(result_data[i], out[i], 1e-6F);
|
||||||
|
@ -83,7 +83,7 @@ TEST(extension, create_model_from_extension) {
|
|||||||
auto fill_tensor = [](ov::Tensor& tensor) {
|
auto fill_tensor = [](ov::Tensor& tensor) {
|
||||||
int32_t* data = tensor.data<int32_t>();
|
int32_t* data = tensor.data<int32_t>();
|
||||||
for (size_t i = 0; i < tensor.get_size(); i++)
|
for (size_t i = 0; i < tensor.get_size(); i++)
|
||||||
data[i] = i;
|
data[i] = static_cast<int32_t>(i);
|
||||||
};
|
};
|
||||||
|
|
||||||
ov::TensorVector inputs;
|
ov::TensorVector inputs;
|
||||||
|
@ -42,7 +42,7 @@ TEST(ProgressReporter_Callables, StructReporter) {
|
|||||||
ProgressConsumer consumer;
|
ProgressConsumer consumer;
|
||||||
|
|
||||||
ProgressReporterExtension ext{consumer};
|
ProgressReporterExtension ext{consumer};
|
||||||
ext.report_progress(0.5675, 37, 21);
|
ext.report_progress(0.5675f, 37, 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -57,7 +57,7 @@ void reporter_stub(float, unsigned int, unsigned int) {}
|
|||||||
|
|
||||||
TEST(ProgressReporter_Callables, FunctionReporter) {
|
TEST(ProgressReporter_Callables, FunctionReporter) {
|
||||||
ProgressReporterExtension ext{function_reporter};
|
ProgressReporterExtension ext{function_reporter};
|
||||||
ext.report_progress(0.2574, 101, 26);
|
ext.report_progress(0.2574f, 101, 26);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ProgressReporter, ReportMoreStepsThanTotal) {
|
TEST(ProgressReporter, ReportMoreStepsThanTotal) {
|
||||||
@ -67,7 +67,7 @@ TEST(ProgressReporter, ReportMoreStepsThanTotal) {
|
|||||||
|
|
||||||
TEST(ProgressReporter, ReportMoreThan100Percent) {
|
TEST(ProgressReporter, ReportMoreThan100Percent) {
|
||||||
ProgressReporterExtension ext{reporter_stub};
|
ProgressReporterExtension ext{reporter_stub};
|
||||||
EXPECT_THROW(ext.report_progress(1.00001, 100, 50), ov::frontend::GeneralFailure);
|
EXPECT_THROW(ext.report_progress(1.00001f, 100, 50), ov::frontend::GeneralFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ProgressReporter, ReportLessThanZeroPercent) {
|
TEST(ProgressReporter, ReportLessThanZeroPercent) {
|
||||||
|
@ -21,7 +21,7 @@ int main(int argc, char** argv) {
|
|||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
argv_vector.push_back(argv[i]);
|
argv_vector.push_back(argv[i]);
|
||||||
}
|
}
|
||||||
argc = argv_vector.size();
|
argc = static_cast<int>(argv_vector.size());
|
||||||
::testing::InitGoogleTest(&argc, argv_vector.data());
|
::testing::InitGoogleTest(&argc, argv_vector.data());
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
if (cpath_flag == argv[i] && (++i) < argc) {
|
if (cpath_flag == argv[i] && (++i) < argc) {
|
||||||
|
@ -263,7 +263,7 @@ TEST_F(OVTensorTest, readRangeRoiBlob) {
|
|||||||
const auto origPtr = t.data<int32_t>();
|
const auto origPtr = t.data<int32_t>();
|
||||||
ASSERT_NE(nullptr, origPtr);
|
ASSERT_NE(nullptr, origPtr);
|
||||||
for (size_t i = 0; i < t.get_size(); ++i) {
|
for (size_t i = 0; i < t.get_size(); ++i) {
|
||||||
origPtr[i] = i;
|
origPtr[i] = static_cast<int32_t>(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ov::Tensor roi_tensor{t, {0, 0, 2, 4}, {1, 3, 4, 8}};
|
ov::Tensor roi_tensor{t, {0, 0, 2, 4}, {1, 3, 4, 8}};
|
||||||
|
@ -609,7 +609,7 @@ TEST(pre_post_process, unsupported_model_color_format_i420) {
|
|||||||
{
|
{
|
||||||
auto p = PrePostProcessor(f);
|
auto p = PrePostProcessor(f);
|
||||||
p.input().tensor().set_color_format(ColorFormat::I420_THREE_PLANES);
|
p.input().tensor().set_color_format(ColorFormat::I420_THREE_PLANES);
|
||||||
p.input().preprocess().scale(2.1).convert_color(ColorFormat::BGR);
|
p.input().preprocess().scale(2.1f).convert_color(ColorFormat::BGR);
|
||||||
f = p.build();
|
f = p.build();
|
||||||
},
|
},
|
||||||
ov::AssertFailure);
|
ov::AssertFailure);
|
||||||
|
@ -27,11 +27,11 @@ TEST(type_prop, deformable_psroi_pooling_no_offsets_group_size_3) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(type_prop, deformable_psroi_pooling_group_size_3) {
|
TEST(type_prop, deformable_psroi_pooling_group_size_3) {
|
||||||
const float spatial_scale = 0.0625;
|
const float spatial_scale = 0.0625f;
|
||||||
const int64_t output_dim = 882;
|
const int64_t output_dim = 882;
|
||||||
const int64_t group_size = 3;
|
const int64_t group_size = 3;
|
||||||
const int64_t part_size = 3;
|
const int64_t part_size = 3;
|
||||||
const double spatial_bins = 4;
|
const int64_t spatial_bins = 4;
|
||||||
|
|
||||||
const auto rois_dim = 300;
|
const auto rois_dim = 300;
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ TEST(type_prop, deformable_psroi_pooling_group_size_3) {
|
|||||||
"bilinear_deformable",
|
"bilinear_deformable",
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
0.1,
|
0.1f,
|
||||||
part_size);
|
part_size);
|
||||||
|
|
||||||
const PartialShape expected_output{rois_dim, output_dim, group_size, group_size};
|
const PartialShape expected_output{rois_dim, output_dim, group_size, group_size};
|
||||||
@ -56,11 +56,11 @@ TEST(type_prop, deformable_psroi_pooling_group_size_3) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(type_prop, deformable_psroi_pooling_group_size_7) {
|
TEST(type_prop, deformable_psroi_pooling_group_size_7) {
|
||||||
const float spatial_scale = 0.0625;
|
const float spatial_scale = 0.0625f;
|
||||||
const int64_t output_dim = 162;
|
const int64_t output_dim = 162;
|
||||||
const int64_t group_size = 7;
|
const int64_t group_size = 7;
|
||||||
const int64_t part_size = 7;
|
const int64_t part_size = 7;
|
||||||
const double spatial_bins = 4;
|
const int64_t spatial_bins = 4;
|
||||||
|
|
||||||
const auto rois_dim = 300;
|
const auto rois_dim = 300;
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ TEST(type_prop, deformable_psroi_pooling_group_size_7) {
|
|||||||
"bilinear_deformable",
|
"bilinear_deformable",
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
0.1,
|
0.1f,
|
||||||
part_size);
|
part_size);
|
||||||
|
|
||||||
const PartialShape expected_output{rois_dim, output_dim, group_size, group_size};
|
const PartialShape expected_output{rois_dim, output_dim, group_size, group_size};
|
||||||
@ -170,7 +170,7 @@ TEST(type_prop, deformable_psroi_pooling_invalid_data_input_rank) {
|
|||||||
const int64_t output_dim = 162;
|
const int64_t output_dim = 162;
|
||||||
const int64_t group_size = 7;
|
const int64_t group_size = 7;
|
||||||
const int64_t part_size = 7;
|
const int64_t part_size = 7;
|
||||||
const double spatial_bins = 4;
|
const int64_t spatial_bins = 4;
|
||||||
|
|
||||||
const auto rois_dim = 300;
|
const auto rois_dim = 300;
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ TEST(type_prop, deformable_psroi_pooling_invalid_data_input_rank) {
|
|||||||
"bilinear_deformable",
|
"bilinear_deformable",
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
0.1,
|
0.1f,
|
||||||
part_size);
|
part_size);
|
||||||
|
|
||||||
// Should have thrown, so fail if it didn't
|
// Should have thrown, so fail if it didn't
|
||||||
@ -202,7 +202,7 @@ TEST(type_prop, deformable_psroi_pooling_invalid_data_input_rank) {
|
|||||||
|
|
||||||
TEST(type_prop, deformable_psroi_pooling_invalid_box_coordinates_rank) {
|
TEST(type_prop, deformable_psroi_pooling_invalid_box_coordinates_rank) {
|
||||||
const int64_t output_dim = 4;
|
const int64_t output_dim = 4;
|
||||||
const float spatial_scale = 0.9;
|
const float spatial_scale = 0.9f;
|
||||||
const int64_t group_size = 7;
|
const int64_t group_size = 7;
|
||||||
|
|
||||||
const auto rois_dim = 300;
|
const auto rois_dim = 300;
|
||||||
@ -229,7 +229,7 @@ TEST(type_prop, deformable_psroi_pooling_invalid_offstes_rank) {
|
|||||||
const int64_t output_dim = 162;
|
const int64_t output_dim = 162;
|
||||||
const int64_t group_size = 7;
|
const int64_t group_size = 7;
|
||||||
const int64_t part_size = 7;
|
const int64_t part_size = 7;
|
||||||
const double spatial_bins = 4;
|
const int64_t spatial_bins = 4;
|
||||||
|
|
||||||
const auto rois_dim = 300;
|
const auto rois_dim = 300;
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ TEST(type_prop, deformable_psroi_pooling_invalid_offstes_rank) {
|
|||||||
"bilinear_deformable",
|
"bilinear_deformable",
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
spatial_bins,
|
spatial_bins,
|
||||||
0.1,
|
0.1f,
|
||||||
part_size);
|
part_size);
|
||||||
|
|
||||||
// Should have thrown, so fail if it didn't
|
// Should have thrown, so fail if it didn't
|
||||||
|
@ -390,6 +390,7 @@ TEST(type_prop, gather_7_dynamic_batch_dims_inconsistent) {
|
|||||||
int64_t axis = 1;
|
int64_t axis = 1;
|
||||||
auto A = make_shared<op::Constant>(element::i64, Shape{1}, vector<int64_t>{axis});
|
auto A = make_shared<op::Constant>(element::i64, Shape{1}, vector<int64_t>{axis});
|
||||||
int64_t batch_dims = 1;
|
int64_t batch_dims = 1;
|
||||||
|
|
||||||
OV_EXPECT_THROW(auto g = make_shared<op::v7::Gather>(D, I, A, batch_dims),
|
OV_EXPECT_THROW(auto g = make_shared<op::v7::Gather>(D, I, A, batch_dims),
|
||||||
NodeValidationFailure,
|
NodeValidationFailure,
|
||||||
HasSubstr("data and indices must have equal or intersecting sizes until batch_dims"));
|
HasSubstr("data and indices must have equal or intersecting sizes until batch_dims"));
|
||||||
|
@ -128,8 +128,8 @@ TEST(type_prop, gru_sequence_bidirectional) {
|
|||||||
const auto B = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 3 * hidden_size});
|
const auto B = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 3 * hidden_size});
|
||||||
|
|
||||||
const auto direction = op::RecurrentSequenceDirection::BIDIRECTIONAL;
|
const auto direction = op::RecurrentSequenceDirection::BIDIRECTIONAL;
|
||||||
const std::vector<float> activations_alpha = {2.7, 7.0, 32.367};
|
const std::vector<float> activations_alpha = {2.7f, 7.0f, 32.367f};
|
||||||
const std::vector<float> activations_beta = {0.0, 5.49, 6.0};
|
const std::vector<float> activations_beta = {0.0f, 5.49f, 6.0f};
|
||||||
const std::vector<std::string> activations = {"tanh", "sigmoid"};
|
const std::vector<std::string> activations = {"tanh", "sigmoid"};
|
||||||
|
|
||||||
const auto sequence = make_shared<opset5::GRUSequence>(X,
|
const auto sequence = make_shared<opset5::GRUSequence>(X,
|
||||||
|
@ -235,8 +235,8 @@ TEST(type_prop, lstm_sequence_bidirectional) {
|
|||||||
const auto B = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 4 * hidden_size});
|
const auto B = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 4 * hidden_size});
|
||||||
|
|
||||||
const auto lstm_direction = opset5::LSTMSequence::direction::BIDIRECTIONAL;
|
const auto lstm_direction = opset5::LSTMSequence::direction::BIDIRECTIONAL;
|
||||||
const std::vector<float> activations_alpha = {2.7, 7.0, 32.367};
|
const std::vector<float> activations_alpha = {2.7f, 7.0f, 32.367f};
|
||||||
const std::vector<float> activations_beta = {0.0, 5.49, 6.0};
|
const std::vector<float> activations_beta = {0.0f, 5.49f, 6.0f};
|
||||||
const std::vector<std::string> activations = {"tanh", "sigmoid", "sigmoid"};
|
const std::vector<std::string> activations = {"tanh", "sigmoid", "sigmoid"};
|
||||||
|
|
||||||
const auto lstm_sequence = make_shared<opset5::LSTMSequence>(X,
|
const auto lstm_sequence = make_shared<opset5::LSTMSequence>(X,
|
||||||
@ -289,8 +289,8 @@ TEST(type_prop, lstm_sequence_v1_bidirectional) {
|
|||||||
const auto P = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 3 * hidden_size});
|
const auto P = make_shared<opset5::Parameter>(element::f32, Shape{num_directions, 3 * hidden_size});
|
||||||
|
|
||||||
const auto lstm_direction = opset5::LSTMSequence::direction::BIDIRECTIONAL;
|
const auto lstm_direction = opset5::LSTMSequence::direction::BIDIRECTIONAL;
|
||||||
const std::vector<float> activations_alpha = {2.7, 7.0, 32.367};
|
const std::vector<float> activations_alpha = {2.7f, 7.0f, 32.367f};
|
||||||
const std::vector<float> activations_beta = {0.0, 5.49, 6.0};
|
const std::vector<float> activations_beta = {0.0f, 5.49f, 6.0f};
|
||||||
const std::vector<std::string> activations = {"tanh", "sigmoid", "sigmoid"};
|
const std::vector<std::string> activations = {"tanh", "sigmoid", "sigmoid"};
|
||||||
|
|
||||||
const auto lstm_sequence = make_shared<opset1::LSTMSequence>(X,
|
const auto lstm_sequence = make_shared<opset1::LSTMSequence>(X,
|
||||||
|
@ -40,7 +40,7 @@ TEST(type_prop, mvn_6) {
|
|||||||
auto data = make_shared<op::Parameter>(element::f32, Shape{1, 2, 3, 4});
|
auto data = make_shared<op::Parameter>(element::f32, Shape{1, 2, 3, 4});
|
||||||
auto axes = make_shared<op::Parameter>(element::i64, Shape{3});
|
auto axes = make_shared<op::Parameter>(element::i64, Shape{3});
|
||||||
|
|
||||||
auto mvn_func = make_shared<op::v6::MVN>(data, axes, true, 1e-6, op::MVNEpsMode::INSIDE_SQRT);
|
auto mvn_func = make_shared<op::v6::MVN>(data, axes, true, 1e-6f, op::MVNEpsMode::INSIDE_SQRT);
|
||||||
EXPECT_EQ(mvn_func->get_element_type(), element::f32);
|
EXPECT_EQ(mvn_func->get_element_type(), element::f32);
|
||||||
EXPECT_EQ(mvn_func->get_shape(), (Shape{1, 2, 3, 4}));
|
EXPECT_EQ(mvn_func->get_shape(), (Shape{1, 2, 3, 4}));
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ TEST(type_prop, mvn_6) {
|
|||||||
TEST(type_prop, mvn_6_partial) {
|
TEST(type_prop, mvn_6_partial) {
|
||||||
auto data = make_shared<op::Parameter>(element::f32, PartialShape{1, Dimension::dynamic(), 5, 6});
|
auto data = make_shared<op::Parameter>(element::f32, PartialShape{1, Dimension::dynamic(), 5, 6});
|
||||||
auto axes = make_shared<op::Parameter>(element::i64, Shape{3});
|
auto axes = make_shared<op::Parameter>(element::i64, Shape{3});
|
||||||
auto mvn_func = make_shared<op::v6::MVN>(data, axes, true, 1e-6, op::MVNEpsMode::INSIDE_SQRT);
|
auto mvn_func = make_shared<op::v6::MVN>(data, axes, true, 1e-6f, op::MVNEpsMode::INSIDE_SQRT);
|
||||||
EXPECT_EQ(mvn_func->get_element_type(), element::f32);
|
EXPECT_EQ(mvn_func->get_element_type(), element::f32);
|
||||||
ASSERT_TRUE(mvn_func->get_output_partial_shape(0).same_scheme((PartialShape{1, Dimension::dynamic(), 5, 6})));
|
ASSERT_TRUE(mvn_func->get_output_partial_shape(0).same_scheme((PartialShape{1, Dimension::dynamic(), 5, 6})));
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ TEST(type_prop, mvn_6_partial) {
|
|||||||
auto mvn_partial = make_shared<op::v6::MVN>(make_shared<op::Parameter>(element::f32, PartialShape::dynamic()),
|
auto mvn_partial = make_shared<op::v6::MVN>(make_shared<op::Parameter>(element::f32, PartialShape::dynamic()),
|
||||||
axes,
|
axes,
|
||||||
true,
|
true,
|
||||||
1e-6,
|
1e-6f,
|
||||||
op::MVNEpsMode::INSIDE_SQRT);
|
op::MVNEpsMode::INSIDE_SQRT);
|
||||||
ASSERT_TRUE(mvn_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic()));
|
ASSERT_TRUE(mvn_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic()));
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ using namespace ngraph;
|
|||||||
TEST(type_prop, psroi_pooling_average) {
|
TEST(type_prop, psroi_pooling_average) {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_shape(), (Shape{150, 2, 6, 6}));
|
ASSERT_EQ(op->get_shape(), (Shape{150, 2, 6, 6}));
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ TEST(type_prop, psroi_pooling_average) {
|
|||||||
TEST(type_prop, psroi_pooling_bilinear) {
|
TEST(type_prop, psroi_pooling_bilinear) {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 18, 6, 1, 2, 2, "bilinear");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 18, 6, 1.0f, 2, 2, "bilinear");
|
||||||
ASSERT_EQ(op->get_shape(), (Shape{150, 18, 6, 6}));
|
ASSERT_EQ(op->get_shape(), (Shape{150, 18, 6, 6}));
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ TEST(type_prop, psroi_pooling_invalid_type) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::i32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::i32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("Feature maps' data type must be floating point"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("Feature maps' data type must be floating point"));
|
||||||
@ -41,7 +41,7 @@ TEST(type_prop, psroi_pooling_invalid_type) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::i32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::i32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("Coords' data type must be floating point"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("Coords' data type must be floating point"));
|
||||||
@ -54,7 +54,7 @@ TEST(type_prop, psroi_pooling_invalid_mode) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "invalid_mode");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "invalid_mode");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("Expected 'average' or 'bilinear' mode"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("Expected 'average' or 'bilinear' mode"));
|
||||||
@ -67,7 +67,7 @@ TEST(type_prop, psroi_pooling_invalid_shapes) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("PSROIPooling expects 4 dimensions for input"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("PSROIPooling expects 4 dimensions for input"));
|
||||||
@ -78,7 +78,7 @@ TEST(type_prop, psroi_pooling_invalid_shapes) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 1, 72, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 1, 72, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("PSROIPooling expects 2 dimensions for box coordinates"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("PSROIPooling expects 2 dimensions for box coordinates"));
|
||||||
@ -91,7 +91,7 @@ TEST(type_prop, psroi_pooling_invalid_group_size) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 0, 1, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 0, 1.0f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("group_size has to be greater than 0"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("group_size has to be greater than 0"));
|
||||||
@ -102,7 +102,7 @@ TEST(type_prop, psroi_pooling_invalid_group_size) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 5, 1, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 5, 1.0f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(),
|
EXPECT_HAS_SUBSTRING(error.what(),
|
||||||
@ -116,7 +116,7 @@ TEST(type_prop, psroi_pooling_invalid_output_dim) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1.0f, 0, 0, "average");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(
|
EXPECT_HAS_SUBSTRING(
|
||||||
@ -131,7 +131,7 @@ TEST(type_prop, psroi_pooling_invalid_spatial_bins) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1, 0, 0, "bilinear");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1.0f, 0, 0, "bilinear");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_x has to be greater than 0"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_x has to be greater than 0"));
|
||||||
@ -142,7 +142,7 @@ TEST(type_prop, psroi_pooling_invalid_spatial_bins) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1, 1, 0, "bilinear");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1.0f, 1, 0, "bilinear");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_y has to be greater than 0"));
|
EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_y has to be greater than 0"));
|
||||||
@ -153,7 +153,7 @@ TEST(type_prop, psroi_pooling_invalid_spatial_bins) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1, 2, 5, "bilinear");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 17, 2, 1.0f, 2, 5, "bilinear");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(),
|
EXPECT_HAS_SUBSTRING(error.what(),
|
||||||
@ -166,7 +166,7 @@ TEST(type_prop, psroi_pooling_invalid_spatial_bins) {
|
|||||||
try {
|
try {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 5, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 10, 2, 1, 2, 4, "bilinear");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 10, 2, 1.0f, 2, 4, "bilinear");
|
||||||
FAIL() << "Exception expected";
|
FAIL() << "Exception expected";
|
||||||
} catch (const NodeValidationFailure& error) {
|
} catch (const NodeValidationFailure& error) {
|
||||||
EXPECT_HAS_SUBSTRING(error.what(),
|
EXPECT_HAS_SUBSTRING(error.what(),
|
||||||
@ -181,14 +181,14 @@ TEST(type_prop, psroi_pooling_dynamic_ranks) {
|
|||||||
{
|
{
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape::dynamic());
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape::dynamic());
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{150, 5});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic());
|
ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic());
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape::dynamic());
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape::dynamic());
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic());
|
ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic());
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
@ -197,7 +197,7 @@ TEST(type_prop, psroi_pooling_dynamic_ranks) {
|
|||||||
TEST(type_prop, psroi_pooling_dynamic_num_boxes) {
|
TEST(type_prop, psroi_pooling_dynamic_num_boxes) {
|
||||||
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
auto inputs = std::make_shared<op::Parameter>(element::Type_t::f32, Shape{1, 72, 4, 5});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape{{Dimension::dynamic(), 5}});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape{{Dimension::dynamic(), 5}});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}}));
|
ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}}));
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ TEST(type_prop, psroi_pooling_static_rank_dynamic_shape) {
|
|||||||
PartialShape{{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}});
|
PartialShape{{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32,
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32,
|
||||||
PartialShape{{Dimension::dynamic(), Dimension::dynamic()}});
|
PartialShape{{Dimension::dynamic(), Dimension::dynamic()}});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}}));
|
ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}}));
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ TEST(type_prop, psroi_pooling_static_rank_dynamic_shape) {
|
|||||||
element::Type_t::f32,
|
element::Type_t::f32,
|
||||||
PartialShape{{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}});
|
PartialShape{{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}});
|
||||||
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape{{200, Dimension::dynamic()}});
|
auto coords = std::make_shared<op::Parameter>(element::Type_t::f32, PartialShape{{200, Dimension::dynamic()}});
|
||||||
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625, 0, 0, "average");
|
auto op = std::make_shared<op::PSROIPooling>(inputs, coords, 2, 6, 0.0625f, 0, 0, "average");
|
||||||
ASSERT_EQ(op->get_shape(), (Shape{200, 2, 6, 6}));
|
ASSERT_EQ(op->get_shape(), (Shape{200, 2, 6, 6}));
|
||||||
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
ASSERT_EQ(op->get_element_type(), element::Type_t::f32);
|
||||||
}
|
}
|
||||||
|
@ -432,9 +432,9 @@ TEST(type_prop, range_v4_some_const_shape_inference) {
|
|||||||
|
|
||||||
TEST(type_prop, range_v4_trunc_inputs_shape_inference) {
|
TEST(type_prop, range_v4_trunc_inputs_shape_inference) {
|
||||||
element::Type_t et = element::f32;
|
element::Type_t et = element::f32;
|
||||||
auto start = make_shared<op::Constant>(et, Shape{}, std::vector<float>{0.9});
|
auto start = make_shared<op::Constant>(et, Shape{}, std::vector<float>{0.9f});
|
||||||
auto stop = make_shared<op::Constant>(et, Shape{}, std::vector<float>{10.3});
|
auto stop = make_shared<op::Constant>(et, Shape{}, std::vector<float>{10.3f});
|
||||||
auto step = make_shared<op::Constant>(et, Shape{}, std::vector<float>{1.7});
|
auto step = make_shared<op::Constant>(et, Shape{}, std::vector<float>{1.7f});
|
||||||
auto range = make_shared<op::v4::Range>(start, stop, step, element::i32);
|
auto range = make_shared<op::v4::Range>(start, stop, step, element::i32);
|
||||||
auto pshape_out = range->get_output_partial_shape(0);
|
auto pshape_out = range->get_output_partial_shape(0);
|
||||||
ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1});
|
ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1});
|
||||||
|
@ -68,6 +68,6 @@ TEST(type_prop_layers, reorg_yolo) {
|
|||||||
TEST(type_prop_layers, roi_pooling) {
|
TEST(type_prop_layers, roi_pooling) {
|
||||||
auto inputs = make_shared<op::Parameter>(element::f32, Shape{2, 3, 4, 5});
|
auto inputs = make_shared<op::Parameter>(element::f32, Shape{2, 3, 4, 5});
|
||||||
auto coords = make_shared<op::Parameter>(element::f32, Shape{150, 5});
|
auto coords = make_shared<op::Parameter>(element::f32, Shape{150, 5});
|
||||||
auto op = make_shared<op::ROIPooling>(inputs, coords, Shape{6, 6}, 0.0625, "max");
|
auto op = make_shared<op::ROIPooling>(inputs, coords, Shape{6, 6}, 0.0625f, "max");
|
||||||
ASSERT_EQ(op->get_shape(), (Shape{150, 3, 6, 6}));
|
ASSERT_EQ(op->get_shape(), (Shape{150, 3, 6, 6}));
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ TEST(attributes, deformable_psroi_pooling_op) {
|
|||||||
string mode = "bilinear_deformable";
|
string mode = "bilinear_deformable";
|
||||||
const int spatial_bins_x = 2;
|
const int spatial_bins_x = 2;
|
||||||
const int spatial_bins_y = 3;
|
const int spatial_bins_y = 3;
|
||||||
const float trans_std = 0.1;
|
const float trans_std = 0.1f;
|
||||||
const int part_size = 3;
|
const int part_size = 3;
|
||||||
|
|
||||||
auto op = make_shared<opset1::DeformablePSROIPooling>(input,
|
auto op = make_shared<opset1::DeformablePSROIPooling>(input,
|
||||||
|
@ -41,7 +41,7 @@ TEST(attributes, mvn_v6_op) {
|
|||||||
const auto data = make_shared<op::Parameter>(element::i32, Shape{2, 3, 4, 5});
|
const auto data = make_shared<op::Parameter>(element::i32, Shape{2, 3, 4, 5});
|
||||||
auto axes = ngraph::opset6::Constant::create(ngraph::element::i64, ngraph::Shape{2}, {2, 3});
|
auto axes = ngraph::opset6::Constant::create(ngraph::element::i64, ngraph::Shape{2}, {2, 3});
|
||||||
|
|
||||||
const auto op = make_shared<opset6::MVN>(data, axes, false, 0.1, op::MVNEpsMode::INSIDE_SQRT);
|
const auto op = make_shared<opset6::MVN>(data, axes, false, 0.1f, op::MVNEpsMode::INSIDE_SQRT);
|
||||||
|
|
||||||
NodeBuilder builder(op, {data, axes});
|
NodeBuilder builder(op, {data, axes});
|
||||||
const auto g_op = ov::as_type_ptr<opset6::MVN>(builder.create());
|
const auto g_op = ov::as_type_ptr<opset6::MVN>(builder.create());
|
||||||
|
@ -23,7 +23,7 @@ TEST(attributes, psroi_pooling_op) {
|
|||||||
|
|
||||||
const int64_t output_dim = 64;
|
const int64_t output_dim = 64;
|
||||||
const int64_t group_size = 4;
|
const int64_t group_size = 4;
|
||||||
const float spatial_scale = 0.0625;
|
const float spatial_scale = 0.0625f;
|
||||||
int spatial_bins_x = 1;
|
int spatial_bins_x = 1;
|
||||||
int spatial_bins_y = 1;
|
int spatial_bins_y = 1;
|
||||||
string mode = "average";
|
string mode = "average";
|
||||||
|
@ -21,7 +21,7 @@ TEST(attributes, roi_pooling_op) {
|
|||||||
const auto data = make_shared<op::Parameter>(element::f32, Shape{2, 3, 4, 5});
|
const auto data = make_shared<op::Parameter>(element::f32, Shape{2, 3, 4, 5});
|
||||||
const auto coords = make_shared<op::Parameter>(element::f32, Shape{2, 5});
|
const auto coords = make_shared<op::Parameter>(element::f32, Shape{2, 5});
|
||||||
|
|
||||||
const auto op = make_shared<opset3::ROIPooling>(data, coords, Shape{5, 5}, 0.123, "bilinear");
|
const auto op = make_shared<opset3::ROIPooling>(data, coords, Shape{5, 5}, 0.123f, "bilinear");
|
||||||
NodeBuilder builder(op, {data, coords});
|
NodeBuilder builder(op, {data, coords});
|
||||||
const auto g_op = ov::as_type_ptr<opset3::ROIPooling>(builder.create());
|
const auto g_op = ov::as_type_ptr<opset3::ROIPooling>(builder.create());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user