Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6404 Discussions

Error shape/value propagation / converting pre-trained tensor flow model

Ortiz__Andrés
Beginner
503 Views

HI guys,

How are you ? , I'm running an annoying problem trying converting this pre-trained tensor flow model.

Im using this cmd to convert it :

mo.py --input_model ./graph.pb --output_dir ./result --input_model_is_text 

First, I got : [ ERROR ]  Shape [-1 25 25  3] is not fully defined for output 0 of "x_input". Use --input_shape with positive integers to override model input shapes.

I managed to change it on the XML file ( I don't know if It will affect my prediction accuracy, actually I'm just trying to convert it ) 

node {
  name: "x_input"
  op: "Placeholder"
  attr {
    key: "dtype"
    value {
      type: DT_FLOAT
    }
  }
  attr {
    key: "shape"
    value {
      shape {
        dim {
          size: 1
        }
        dim {
          size: 25
        }
        dim {
          size: 25
        }
        dim {
          size: 3
        }
      }
    }
  }
}

 

Then I got this error : Stopped shape/value propagation at "GatherNd_2" 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. 
Exception occurred during running replacer "REPLACEMENT_ID" (<class 'extensions.middle.PartialInfer.PartialInfer'>): 
Stopped shape/value propagation at "GatherNd_2" 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. 

 

38. What does the message "Stopped shape/value propagation at node" mean?

Model Optimizer cannot infer shapes or values for the specified node. It can happen because of a bug in the custom shape infer function, because the node inputs have incorrect values/shapes, or because the input shapes are incorrect.

 

What It's supposed to be the correct shape ?

this is the node on the XML file  : 

 

node {
  name: "GatherNd_2"
  op: "GatherNd"
  input: "Reshape_1"
  input: "stack_5"
  attr {
    key: "Tindices"
    value {
      type: DT_INT32
    }
  }
  attr {
    key: "Tparams"
    value {
      type: DT_FLOAT
    }
  }
}

 

Model Optimizer arguments:
Common parameters:
	- Path to the Input Model: graph.bp
	- Path for generated IR: 	./result
	- IR output name: 	graph
	- Log level: 	DEBUG
	- Batch: 	Not specified, inherited from the model
	- Input layers: 	Not specified, inherited from the model
	- Output layers: 	Not specified, inherited from the model
	- Input shapes: 	Not specified, inherited from the model
	- Mean values: 	Not specified
	- Scale values: 	Not specified
	- Scale factor: 	Not specified
	- Precision of IR: 	FP32
	- Enable fusing: 	True
	- Enable grouped convolutions fusing: 	True
	- Move mean values to preprocess section: 	False
	- Reverse input channels: 	False
TensorFlow specific parameters:
	- Input model in text protobuf format: 	True
	- Path to model dump for TensorBoard: 	None
	- List of shared libraries with TensorFlow custom layers implementation: 	None
	- Update the configuration file with input/output node names: 	None
	- Use configuration file used to generate the model with Object Detection API: 	None
	- Operations to offload: 	None
	- Patterns to offload: 	None
	- Use the config file: 	None
Model Optimizer version: 	2019.3.0-408-gac8584cb7

Thank you.

 

0 Kudos
3 Replies
Sahira_Intel
Moderator
503 Views

Hi Andres,

Are you able to link me to the original Tensorflow model? I'd like to take a look at the original model.

Thank you,

Sahira 

0 Kudos
Ortiz__Andrés
Beginner
503 Views

Hello Sahira, of course.

Thank you very much.

 

0 Kudos
Ortiz__Andrés
Beginner
503 Views

Hello Saira,


Did you have any time to look in to this error ? 
I'm stuck with this a little bit , any help will be appreciated.
Thank you very much again !

0 Kudos
Reply