Switch ONNX Importer to gather v7 (#5084)
This commit is contained in:
parent
0cbcc519ed
commit
e44f0cb2ac
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user