X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=model-optimizer%2Fextensions%2Ffront%2Ftf%2Ffifo_replacer.py;h=8374a58a5ef7d515a6b108ec0593497123d853c7;hb=6dfc778940ec1e52737404ddc5c9634a40064b4d;hp=a8b421ddeb2038d40442a149255b5f91f3cd61fa;hpb=ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf;p=platform%2Fupstream%2Fdldt.git diff --git a/model-optimizer/extensions/front/tf/fifo_replacer.py b/model-optimizer/extensions/front/tf/fifo_replacer.py index a8b421d..8374a58 100644 --- a/model-optimizer/extensions/front/tf/fifo_replacer.py +++ b/model-optimizer/extensions/front/tf/fifo_replacer.py @@ -65,6 +65,7 @@ class FIFOQueue(FrontReplacementSubgraph): """ true_placeholder_shape = match['placeholder'].shape placeholder_shape = match['fifo_queue'].shapes[0] + placeholder_data_type = match['fifo_queue'].types[0] assert true_placeholder_shape.ndim <= 1 if true_placeholder_shape.ndim == 1 and len(true_placeholder_shape) > 1: log.warning( @@ -81,7 +82,8 @@ class FIFOQueue(FrontReplacementSubgraph): graph.remove_node(out.out_node().id) graph.remove_node(out.id) graph.remove_node(match['batch_join'].id) - placeholder = Parameter(graph, {'name': placeholder_name, 'shape': placeholder_shape}).create_node() + placeholder = Parameter(graph, {'name': placeholder_name, 'shape': placeholder_shape, + 'data_type': placeholder_data_type}).create_node() graph.create_edge(placeholder, match['image_batch']) log.info("FIFOQueueV2 pattern was detected. New shape of placeholder {} is {}. Use -b to set batch size if " "needed".format(placeholder.id, placeholder['shape']))