From d0395beca0be5f45570ef1c3588deda35f2afb9f Mon Sep 17 00:00:00 2001 From: Evgeny Kotov Date: Thu, 4 Apr 2024 19:57:37 +0200 Subject: [PATCH] use own set_node_name --- src/frontends/tensorflow/src/op/while.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/frontends/tensorflow/src/op/while.cpp b/src/frontends/tensorflow/src/op/while.cpp index e7650a89315e69..92bbed76996505 100644 --- a/src/frontends/tensorflow/src/op/while.cpp +++ b/src/frontends/tensorflow/src/op/while.cpp @@ -13,6 +13,16 @@ namespace ov { namespace frontend { namespace tensorflow { namespace op { + +namespace { +void set_node_name(const string& node_name, const shared_ptr& node, const OutputVector& outputs) { + node->set_friendly_name(node_name); + for (size_t idx = 0; idx < outputs.size(); ++idx) { + set_out_name({node_name + ":" + to_string(idx)}, outputs[idx]); + } +} +} // namespace + OutputVector translate_while_op(const NodeContext& node) { default_op_checks(node, 1, {"While", "StatelessWhile"}); auto node_name = node.get_name(); @@ -43,7 +53,8 @@ OutputVector translate_while_op(const NodeContext& node) { "[TensorFlow Frontend] Internal error or incorrect input model. Cannot find body graph with name " + body_type); auto while_loop = create_loop_for_tf_while(node.get_name(), body_model, cond_model, ov_inputs); - set_node_name(node.get_name(), while_loop.second); + set_node_name(node.get_name(), while_loop.second, while_loop.first); + return while_loop.first; }