Migration convolution ngraph backend test (#7846)
* Remove fp16 of Convert layer test from skip_tests.config.cpp as it works now * update repo * add convolution reference test and ngraph backend test * fix location of ngraph visitor convolution.cpp
This commit is contained in:
1 parent
2592856200
commit
d50ba1129b
4 files changed
+1132
-1208
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -269,6 +269,7 @@ set(SRC
|
||||
visitors/op/convert.cpp
|
||||
visitors/op/convert_color_nv12.cpp
|
||||
visitors/op/convolution_backprop.cpp
|
||||
visitors/op/convolution.cpp
|
||||
visitors/op/cos.cpp
|
||||
visitors/op/cosh.cpp
|
||||
visitors/op/ctc_loss.cpp
|
||||
@@ -449,7 +450,6 @@ set(MULTI_TEST_SRC
|
||||
backend/concat.in.cpp
|
||||
backend/constant.in.cpp
|
||||
backend/convolution_backprop.in.cpp
|
||||
backend/convolution.in.cpp
|
||||
backend/binary_convolution.in.cpp
|
||||
backend/clamp.in.cpp
|
||||
backend/ctc_greedy_decoder.in.cpp
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,42 @@
|
||||
// Copyright (C) 2018-2021 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "ngraph/ngraph.hpp"
|
||||
#include "ngraph/op/util/attr_types.hpp"
|
||||
#include "ngraph/opsets/opset1.hpp"
|
||||
#include "ngraph/opsets/opset3.hpp"
|
||||
#include "ngraph/opsets/opset4.hpp"
|
||||
#include "ngraph/opsets/opset5.hpp"
|
||||
#include "util/visitor.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
using ngraph::test::NodeBuilder;
|
||||
using ngraph::test::ValueMap;
|
||||
|
||||
TEST(attributes, convolution) {
|
||||
NodeBuilder::get_ops().register_factory<op::v1::Convolution>();
|
||||
auto data = make_shared<op::Parameter>(element::f32, Shape{1, 16, 124, 124});
|
||||
auto filters = make_shared<op::Parameter>(element::f32, Shape{2, 16, 3, 3});
|
||||
auto strides = Strides{1, 1};
|
||||
auto pads_begin = CoordinateDiff{1, 2};
|
||||
auto pads_end = CoordinateDiff{1, 2};
|
||||
auto dilations = Strides{1, 1};
|
||||
auto convolution =
|
||||
make_shared<op::v1::Convolution>(data, filters, strides, pads_begin, pads_end, dilations, op::PadType::VALID);
|
||||
|
||||
NodeBuilder builder(convolution);
|
||||
auto g_convolution = ov::as_type_ptr<op::v1::Convolution>(builder.create());
|
||||
|
||||
// attribute count
|
||||
const auto expected_attr_count = 5;
|
||||
EXPECT_EQ(builder.get_value_map_size(), expected_attr_count);
|
||||
|
||||
EXPECT_EQ(g_convolution->get_strides(), convolution->get_strides());
|
||||
EXPECT_EQ(g_convolution->get_pads_begin(), convolution->get_pads_begin());
|
||||
EXPECT_EQ(g_convolution->get_pads_end(), convolution->get_pads_end());
|
||||
EXPECT_EQ(g_convolution->get_dilations(), convolution->get_dilations());
|
||||
EXPECT_EQ(g_convolution->get_auto_pad(), convolution->get_auto_pad());
|
||||
}
|
||||
Reference in new issue
Block a user