From 87026e3065a2d17a46c196518d8937c78956d2a1 Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Fri, 28 Aug 2020 09:45:29 +0300 Subject: [PATCH] Fix after review #4 Signed-off-by: Roman Kazantsev --- .../extensions/front/tf/CTCGreedyDecoderReplacement_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model-optimizer/extensions/front/tf/CTCGreedyDecoderReplacement_test.py b/model-optimizer/extensions/front/tf/CTCGreedyDecoderReplacement_test.py index b01c6b55b78c84..8fe482d939131c 100644 --- a/model-optimizer/extensions/front/tf/CTCGreedyDecoderReplacement_test.py +++ b/model-optimizer/extensions/front/tf/CTCGreedyDecoderReplacement_test.py @@ -63,7 +63,8 @@ def test1(self): nodes_with_edges_only=True) (flag, resp) = compare_graphs(graph, graph_ref, 'last', check_op_attrs=True) - self.assertEqual(graph.get_op_nodes(op='Cast')[0]['name'], 'sparse_to_dense', + self.assertEqual(len(graph.get_op_nodes(op='Cast')) == 1 and + graph.get_op_nodes(op='Cast')[0]['name'] == 'sparse_to_dense', True, 'Name is not inherited from original node for CTCGreedyDecoderReplacement') self.assertTrue(flag, resp) @@ -158,6 +159,7 @@ def test2(self): nodes_with_edges_only=True) (flag, resp) = compare_graphs(graph, graph_ref, 'last', check_op_attrs=True) - self.assertEqual(graph.get_op_nodes(op='Cast')[0]['name'], 'sparse_to_dense', + self.assertEqual(len(graph.get_op_nodes(op='Cast')) == 1 and + graph.get_op_nodes(op='Cast')[0]['name'] == 'sparse_to_dense', True, 'Name is not inherited from original node for CTCGreedyDecoderReplacement2') self.assertTrue(flag, resp)