0

I'm trying to optimize and convert a tensorflow model to OpenVINO IR. It hasn't been very successful because of the problems I'm facing with input shapes. So I'm planning to remodel the whole model with static shapes. The model I'm trying to work on is Tacotron by keithito.

How do I ensure all the nodes in my model will have static shapes?

Will just setting the input placeholder nodes to a fixed shape allow tensorflow to infer and fix the shapes of all other nodes?

1 Answers1

0

You can have dynamic shapes in TF model and provide static shape while cnverting model with ModelOptimizer. Example for input data of size 256x256 with 3 channels.

python mo_tf.py --input_shape [1,256,256,3] --input_model model.pb

Dmitry
  • 46
  • 4
  • Hi Dmitry, thanks for your response. The issue is that even if I provide shapes for the input layer, there are several nodes within the model that are dynamically shaped according to the encoder and decoder time series. I saw several examples for image classification and recognition model conversions. But my model is with variable text input and speech synthesis. The closest I found in the documentation was the DeepSpeech Model which also has dynamic shapes. But the frozen graph provided for optimizing has fixed shapes in the internal nodes. – Sujeendran Menon May 31 '19 at 18:31