Community
cancel
Showing results for 
Search instead for 
Did you mean: 
71 Views

Trouble with conversation tensorflow to IR

I run:

mo_tf.py --input_model final_combined_alpha0.5_weights.pb --log_level=DEBUG 2> log.txt

and it gave errors:

[ ERROR ]  Shape [ -1 192 256   1] is not fully defined for output 0 of "input_1_1". Use --input_shape with positive integers to override model input shapes.
[ ERROR ]  Cannot infer shapes or values for node "input_1_1".
[ ERROR ]  Not all output shapes were inferred or fully defined for node "input_1_1". 
 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 0x000001340ED185E8>.
[ 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).
[ 2019-09-20 12:08:32,564 ] [ DEBUG ] [ infer:196 ]  Node "input_1_1" attributes: {'pb': name: "input_1_1"
op: "Placeholder"
attr {
  key: "dtype"
  value {
    type: DT_FLOAT
  }
}
attr {
  key: "shape"
  value {
    shape {
      dim {
        size: -1
      }
      dim {
        size: 192
      }
      dim {
        size: 256
      }
      dim {
        size: 1
      }
    }
  }
}
, '_in_ports': {}, '_out_ports': {0: {'control_flow': False}}, 'kind': 'op', 'name': 'input_1_1', 'op': 'Parameter', 'precision': 'FP32', 'type': 'Parameter', 'infer': <function Parameter.__init__.<locals>.<lambda> at 0x000001340ED185E8>, 'is_input': True, 'out_ports_count': 1, 'data_type': <class 'numpy.float32'>, 'shape': array([ -1, 192, 256,   1], dtype=int64), 'permute_attrs': <mo.ops.op.PermuteAttrs object at 0x000001340ED0EF48>, 'dim_attrs': ['batch_dims', 'channel_dims', 'axis', 'spatial_dims'], 'shape_attrs': ['output_shape', 'stride', 'pad', 'shape', 'window'], 'IE': [('layer', [('id', <function Op.substitute_ie_attrs.<locals>.<lambda> at 0x000001340ED15318>), 'name', 'precision', 'type'], [('data', [], []), '@ports', '@consts'])], 'is_output_reachable': True, 'is_undead': True, 'is_const_producer': False, 'is_partial_inferred': False}
[ ERROR ]  Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "input_1_1" node. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38. 
[ 2019-09-20 12:08:32,601 ] [ DEBUG ] [ main:308 ]  Traceback (most recent call last):
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\middle\passes\infer.py", line 168, in partial_infer
    node_name)
mo.utils.error.Error: Not all output shapes were inferred or fully defined for node "input_1_1". 
 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. 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 273, in apply_replacements
    for_graph_and_each_sub_graph_recursively(graph, replacer.find_and_replace_pattern)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\middle\pattern_match.py", line 58, in for_graph_and_each_sub_graph_recursively
    func(graph)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\extensions\middle\PartialInfer.py", line 31, in find_and_replace_pattern
    partial_infer(graph)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\middle\passes\infer.py", line 198, in partial_infer
    refer_to_faq_msg(38)) from err
mo.utils.error.Error: Stopped shape/value propagation at "input_1_1" node. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38. 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\main.py", line 302, in main
    return driver(argv)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\main.py", line 251, in driver
    is_binary=not argv.input_model_is_text)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\pipeline\tf.py", line 134, in tf2nx
    class_registration.apply_replacements(graph, class_registration.ClassType.MIDDLE_REPLACER)
  File "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 293, in apply_replacements
    )) from err
mo.utils.error.Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): Stopped shape/value propagation at "input_1_1" node. 
 For more information please refer to Model Optimizer FAQ (https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_Model_Optimizer_FAQ.html), question #38. 

Where is my fail?

 

0 Kudos
1 Reply
Sahira_Intel
Moderator
71 Views

Hi Zabeth,

Can you provide more information about your model please? 

You might be missing a checkpoint file (specified with the parameter --input_checkpoint) 

Take a look at this guide for more information about converting your Tensorflow model to IR. 

Best Regards,

Sahira 

Reply