openvino: Error in `mo` API
So I am converting TensorFlow model in SavedModel format to openvino-IR when I use API method
from openvino.tools import mo
model_ir = mo.convert_model(saved_model_dir=str(MODEL_DIR_PATH),data_type='FP32')
I got error
Error: Exception occurred during running replacer "REPLACEMENT_ID" (<class 'openvino.tools.mo.load.tf.loader.TFLoader'>): Unexpected exception happened during extracting attributes for node StatefulPartitionedCall/StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/Slice_3/begin.
Original exception message: index -1 is out of bounds for axis 0 with size 0
but when I use command-line !mo --saved_model_dir SavedModel --data_type FP32 --output_dir IR it successfully generates XML and bin file but I have to use API only
can anyone help me out !!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24 (8 by maintainers)
@CrackedDS, @ashish-2005, hi guys! PR: https://github.com/openvinotoolkit/openvino/pull/17311
Hi @ashish-2005,
I would like to ask you to check two points:
--silent Falseas follows:and
After that, you can collect these versions for both cases. They look like as follows:
Please share these versions.
Best regards, Roman
Hi @CrackedDS,
I reproduced this issue using both CLI tool and MO API. I sin to freezing functionality (to get frozen
.pb) for some concrete versions of TF. Some constant node created by freezing turns to be empty. Let me deep dive into why it happens.Best regards, Roman
Hi @rkazants
Mine has started working somehow, the only change I made is that I didn’t run the
mocommand-line cell (which I was doing before) and now API is doing fineAs for the model, I am using a pre-trained model efficientdet-d0 from TensorFlow-Hub I first loaded the model with
tensorflow_hubAPI, then saved it in SavedModel format withtf.saved_model.save()and then used the MO API to create Intermediate-RepresentationThanks again for your time Ashish