Skip to content

Commit

Permalink
use own set_node_name
Browse files Browse the repository at this point in the history
  • Loading branch information
evkotov committed Apr 5, 2024
1 parent 7043559 commit d0395be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/frontends/tensorflow/src/op/while.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>& 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();
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d0395be

Please sign in to comment.