Skip to content

Commit

Permalink
Update hard_sigmoid.cpp (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangYiIntel authored Jul 23, 2021
1 parent a17505b commit 23efd25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ngraph/frontend/paddlepaddle/src/op/hard_sigmoid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//

#include "hard_sigmoid.hpp"
#include <ngraph/builder/make_constant.hpp>
#include <ngraph/opsets/opset6.hpp>
#include <paddlepaddle_frontend/utility.hpp>

Expand All @@ -21,8 +20,8 @@ namespace ngraph
auto dtype = data.get_element_type();
float slope = node.get_attribute<float>("slope", 0.2f);
float offset = node.get_attribute<float>("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<ngraph::opset6::HardSigmoid>(data, alpha, beta)},
{"Out"});
Expand All @@ -31,4 +30,4 @@ namespace ngraph
} // namespace op
} // namespace pdpd
} // namespace frontend
} // namespace ngraph
} // namespace ngraph

0 comments on commit 23efd25

Please sign in to comment.