[TF FE] Move to TopK-11 operation and update downgrading TopK transformation (#16590)
* [TF FE] Move to TopK-11 operation Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com> * Update downgrading transformation --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
1 parent
c33a3f87f0
commit
9a5a8f6abc
4 files changed
+41
-24
No files matched your search
@@ -3,10 +3,10 @@
|
||||
//
|
||||
|
||||
#include "common_op_table.hpp"
|
||||
#include "openvino/opsets/opset8.hpp"
|
||||
#include "openvino/opsets/opset11.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ov::opset8;
|
||||
using namespace ov::opset11;
|
||||
|
||||
namespace ov {
|
||||
namespace frontend {
|
||||
@@ -23,10 +23,12 @@ OutputVector translate_top_k_base_op(const NodeContext& node, const ov::Output<o
|
||||
-1,
|
||||
ov::op::v1::TopK::Mode::MAX,
|
||||
sorted ? TopK::SortType::SORT_VALUES : TopK::SortType::SORT_INDICES,
|
||||
ov::element::i32);
|
||||
ov::element::i32,
|
||||
true);
|
||||
set_node_name(node.get_name(), top_k);
|
||||
return top_k->outputs();
|
||||
}
|
||||
|
||||
OutputVector translate_top_k_op(const NodeContext& node) {
|
||||
// retrieve k attribute
|
||||
auto k = node.get_attribute<int64_t>("k");
|
||||
@@ -39,7 +41,6 @@ OutputVector translate_top_k_v2_op(const NodeContext& node) {
|
||||
auto k_input = node.get_input(1);
|
||||
return translate_top_k_base_op(node, k_input, 1);
|
||||
}
|
||||
|
||||
} // namespace op
|
||||
} // namespace tensorflow
|
||||
} // namespace frontend
|
||||
|
||||
Reference in new issue
Block a user