Commit f813fb6d authored by Robert Kimball's avatar Robert Kimball Committed by Scott Cyphers

Fix building on centos with gcc 4.8.5 (#2913)

parent 1147b018
...@@ -46,8 +46,8 @@ void op::Normalize::pre_validate_and_infer_types() ...@@ -46,8 +46,8 @@ void op::Normalize::pre_validate_and_infer_types()
if (data_pshape.is_static() && scale_pshape.is_static()) if (data_pshape.is_static() && scale_pshape.is_static())
{ {
const auto& data_shape{data_pshape.to_shape()}; const Shape data_shape{data_pshape.to_shape()};
const auto& scale_shape{scale_pshape.to_shape()}; const Shape scale_shape{scale_pshape.to_shape()};
// Input data must be 2, 3 or 4D tensor. // Input data must be 2, 3 or 4D tensor.
NODE_VALIDATION_CHECK(this, NODE_VALIDATION_CHECK(this,
...@@ -86,10 +86,9 @@ void op::Normalize::pre_validate_and_infer_types() ...@@ -86,10 +86,9 @@ void op::Normalize::pre_validate_and_infer_types()
NodeVector op::Normalize::decompose_op() const NodeVector op::Normalize::decompose_op() const
{ {
const auto input_node{get_argument(0)}; shared_ptr<Node> data{get_argument(0)};
const auto& input_shape{input_node->get_shape()}; const Shape input_shape{data->get_shape()};
auto data{input_node};
// Reshape to 4D tensor. // Reshape to 4D tensor.
if (input_shape.size() != 4) if (input_shape.size() != 4)
{ {
...@@ -110,7 +109,7 @@ NodeVector op::Normalize::decompose_op() const ...@@ -110,7 +109,7 @@ NodeVector op::Normalize::decompose_op() const
shared_ptr<Node> norm = builder::l2_norm(data, reduction_axes, m_eps); shared_ptr<Node> norm = builder::l2_norm(data, reduction_axes, m_eps);
norm = make_broadcast_node(norm, data->get_shape(), 0); norm = make_broadcast_node(norm, data->get_shape(), 0);
auto scale_node{get_argument(1)}; shared_ptr<Node> scale_node{get_argument(1)};
// Broadcast scale to data tensor shape. // Broadcast scale to data tensor shape.
if (m_channel_shared) if (m_channel_shared)
......
...@@ -117,7 +117,7 @@ namespace ngraph ...@@ -117,7 +117,7 @@ namespace ngraph
inline std::shared_ptr<ngraph::Node> inline std::shared_ptr<ngraph::Node>
make_broadcast_node(const std::shared_ptr<ngraph::Node>& node, make_broadcast_node(const std::shared_ptr<ngraph::Node>& node,
ngraph::Shape new_shape, const ngraph::Shape& new_shape,
std::size_t start_match_axis) std::size_t start_match_axis)
{ {
return std::make_shared<ngraph::op::Broadcast>( return std::make_shared<ngraph::op::Broadcast>(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment