Switch ONNX Importer to gather v7 (#5084)

This commit is contained in:
Tomasz Socha 2021-04-21 13:08:40 +02:00 committed by GitHub
parent 0cbcc519ed
commit e44f0cb2ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
//
#include "ngraph/opsets/opset6.hpp"
#include "ngraph/opsets/opset7.hpp"
namespace ngraph
{
namespace onnx_import
{
namespace default_opset = ngraph::opset6;
namespace default_opset = ngraph::opset7;
}
}

View File

@ -25,13 +25,11 @@ namespace ngraph
auto data = ng_inputs.at(0);
auto indices = ng_inputs.at(1);
auto axis = node.get_attribute_value<int64_t>("axis", 0);
const auto valid_axis = ngraph::normalize_axis(
node.get_description(), axis, data.get_partial_shape().rank());
return {std::make_shared<default_opset::Gather>(
data,
indices,
default_opset::Constant::create(element::i64, Shape{}, {valid_axis}))};
default_opset::Constant::create(element::i64, Shape{}, {axis}))};
}
} // namespace set_1