Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
19 Views

Can not convert tensorflow model to IR.

When I use this script to change the model to IR:

python mo_tf.py --input_model=frozen_inference_graph.pb --tensorflow_object_detection_api_pipeline_config=faster_rcnn_inception_v2_nails_3date_mix.config

I get following errors:

[ ERROR ]  Shape [-1 -1 -1  3] is not fully defined for output 0 of "image_tensor".
 Use --input_shape with positive integers to override model input shapes.          
[ ERROR ]  Cannot infer shapes or values for node "image_tensor".                                                                                                       [ ERROR ]  Not all output shapes were inferred or fully defined for node "image_tensor".                                                                                 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40. 
 [ ERROR ]                                                                                                                                                               [ ERROR ]  It can happen due to bug in custom shape infer function <function Parameter.__init__.<locals>.<lambda> at 0x0000027B56DD1708>.                               
[ ERROR ]  Or because the node inputs have incorrect values/shapes.                                                                                                     [ ERROR ]  Or because input shapes are incorrect (embedded to the model or passed via --input_shape).          
[ ERROR ]  Run Model Optimizer with --log_level=DEBUG for more information.                                                                                             [ ERROR ]  Not all output shapes were inferred or fully defined for node "image_tensor".

When I provide the --input_shape argument then I get:

[ ERROR ]  Shape is not defined for output 0 of "BatchMultiClassNonMaxSuppression/map/while/Slice".                                                                     
[ ERROR ]  Cannot infer shapes or values for node "BatchMultiClassNonMaxSuppression/map/while/Slice".                                                                   
[ ERROR ]  Not all output shapes were inferred or fully defined for node "BatchMultiClassNonMaxSuppression/map/while/Slice".                                            
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #40.   
[ ERROR ]                                                                                                                                                        
[ ERROR ]  It can happen due to bug in custom shape infer function <function Slice.infer at 0x0000029EAD1DA0D8>.                                                       
 [ ERROR ]  Or because the node inputs have incorrect values/shapes.                                                                                                     
[ ERROR ]  Or because input shapes are incorrect (embedded to the model or passed via --input_shape).                                                                  
 [ ERROR ]  Run Model Optimizer with --log_level=DEBUG for more information.                                                                                             
[ ERROR ]  Not all output shapes were inferred or fully defined for node "BatchMultiClassNonMaxSuppression/map/while/Slice". 

I'm using OpenVino R3: [Model Optimizer version: 2019.3.0-375-g332562022]

The problem persists even when I use --batch instead of --input_shape.I have attached my config file.

0 Kudos
0 Replies