Change PowerIE to ops chain (#7439)

This commit is contained in:
Anastasiia Urlapova 2021-09-10 16:55:11 +03:00 committed by GitHub
parent 3ea74bd8f8
commit 754ee2eb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//
#include <legacy/ngraph_ops/power.hpp>
#include <ngraph/opsets/opset6.hpp>
#include "shared_test_classes/subgraph/softsign.hpp"
#include "ngraph_functions/builders.hpp"
@ -37,8 +37,13 @@ void SoftsignTest::SetUp() {
auto params = ngraph::builder::makeParams(ngPrc, { inputShape });
auto abs = std::make_shared<ngraph::op::Abs>(params[0]);
auto add = std::make_shared<ngraph::op::PowerIE>(abs, 1, 1, 1);
auto power = std::make_shared<ngraph::op::PowerIE>(add, -1, 1, 0);
auto const_1 = ngraph::opset1::Constant::create(ngPrc, ngraph::Shape{}, {1});
auto const_neg_1 = ngraph::opset1::Constant::create(ngPrc, ngraph::Shape{}, {-1});
auto add = std::make_shared<ngraph::opset6::Add>(abs, const_1);
auto power = std::make_shared<ngraph::opset6::Power>(add, const_neg_1);
auto mul = std::make_shared<ngraph::op::v1::Multiply>(power, params[0]);
ngraph::ResultVector results{ std::make_shared<ngraph::op::Result>(mul) };
function = std::make_shared<ngraph::Function>(results, params, "SoftSignTest");