From 23efd2525324446d9eac4200233c37cf012aa0fa Mon Sep 17 00:00:00 2001 From: zhangYiIntel Date: Fri, 23 Jul 2021 13:52:48 +0800 Subject: [PATCH] Update hard_sigmoid.cpp (#4) --- ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp b/ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp index 3861c1006e3150..e1ed95dd1f1681 100644 --- a/ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp +++ b/ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp @@ -3,7 +3,6 @@ // #include "hard_sigmoid.hpp" -#include #include #include @@ -21,8 +20,8 @@ namespace ngraph auto dtype = data.get_element_type(); float slope = node.get_attribute("slope", 0.2f); float offset = node.get_attribute("offset", 0.5f); - auto alpha = builder::make_constant(dtype, {}, slope); - auto beta = builder::make_constant(dtype, {}, offset); + auto alpha = ngraph::opset6::Constant::create(dtype, Shape{}, {slope}); + auto beta = ngraph::opset6::Constant::create(dtype, Shape{}, {offset}); return node.default_single_output_mapping( {std::make_shared(data, alpha, beta)}, {"Out"}); @@ -31,4 +30,4 @@ namespace ngraph } // namespace op } // namespace pdpd } // namespace frontend -} // namespace ngraph \ No newline at end of file +} // namespace ngraph