Commit aad2f7e7 authored by tsocha's avatar tsocha Committed by Scott Cyphers

[ONNX] Change default broadcast dim value, gemm improvement (#2638)

* [ONNX] Change default broadcast dim value, gemm improvement

* update comments: ones -> zeros
parent 4996acc4
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "ngraph/frontend/onnx_import/utils/broadcasting.hpp" #include "ngraph/frontend/onnx_import/utils/broadcasting.hpp"
#include "ngraph/frontend/onnx_import/utils/reshape.hpp" #include "ngraph/frontend/onnx_import/utils/reshape.hpp"
#include "ngraph/op/add.hpp" #include "ngraph/op/add.hpp"
#include "ngraph/op/broadcast.hpp"
#include "ngraph/op/constant.hpp" #include "ngraph/op/constant.hpp"
#include "ngraph/op/dot.hpp" #include "ngraph/op/dot.hpp"
#include "ngraph/op/multiply.hpp" #include "ngraph/op/multiply.hpp"
......
...@@ -44,10 +44,10 @@ ngraph::Shape calculate_broadcast_shape(ngraph::Shape left_shape, ngraph::Shape ...@@ -44,10 +44,10 @@ ngraph::Shape calculate_broadcast_shape(ngraph::Shape left_shape, ngraph::Shape
auto right_rank = right_shape.size(); auto right_rank = right_shape.size();
auto max_rank = std::max(left_rank, right_rank); auto max_rank = std::max(left_rank, right_rank);
// left-pad the left_shape with ones // left-pad the left_shape with zeros
left_shape.insert(std::begin(left_shape), max_rank - left_rank, 1); left_shape.insert(std::begin(left_shape), max_rank - left_rank, 0);
// left-pad the right_shape with ones // left-pad the right_shape with zeros
right_shape.insert(std::begin(right_shape), max_rank - right_rank, 1); right_shape.insert(std::begin(right_shape), max_rank - right_rank, 0);
for (std::size_t index = 0; index < max_rank; ++index) for (std::size_t index = 0; index < max_rank; ++index)
{ {
......
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