Commit 0bbd6f9d authored by Adam Rogowiec's avatar Adam Rogowiec Committed by Scott Cyphers

[ONNX] Use v1 ops in Convolution operator. (#4123)

* Return v1::Reshape in builder::reshape function.

* Use default_opset in ONNX Convolution operators.

* Revert builder::reshape to return v0 op.

* Remove unused code.

* Update year in license header.

* Remove AutoBroadcastSpec arg and use default value.
Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent 663e9bb4
......@@ -131,11 +131,12 @@ namespace ngraph
auto bias = inputs.at(2);
const Shape& new_shape = conv_node->get_shape();
auto broadcasted_bias = std::make_shared<ngraph::opset0::Broadcast>(
auto broadcasted_bias = std::make_shared<default_opset::Broadcast>(
bias,
new_shape,
ngraph::op::calculate_broadcast_axes(new_shape, bias->get_shape(), 1));
return {std::make_shared<ngraph::opset0::Add>(conv_node, broadcasted_bias)};
default_opset::Constant::create(
element::i64, Shape{new_shape.size()}, new_shape),
default_opset::Constant::create(element::i64, Shape{1}, {1}));
return {std::make_shared<default_opset::Add>(conv_node, broadcasted_bias)};
}
} // namespace set_1
......
//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
......
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