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 in converting TF2 model with multiple inputs signature

Milad_n
Beginner
498 Views

Hi,

I am trying to convert a saved TF2 model with multiple Input/output containing signatures. I use the following code

mo --saved_model_dir tf_scaled_model --input input_image,input_scales,input_max_feature_num,input_abs_thres,input_global_scales_ind --input_shape [1024,1024,3],[1],[0],[0],[1]

 

where the signature in the original code is defined as 

@tf.function(input_signature=[
tf.TensorSpec(shape=[None, None, 3], dtype=tf.uint8, name='input_image'),
tf.TensorSpec(shape=[None], dtype=tf.float32, name='input_scales'),
tf.TensorSpec(shape=(None), dtype=tf.int32, name='input_max_feature_num'),
tf.TensorSpec(shape=(None), dtype=tf.float32, name='input_abs_thres'),
tf.TensorSpec(
shape=[None], dtype=tf.int32, name='input_global_scales_ind')
])

However, I receive the following error,

[ ERROR ]  Cannot infer shapes or values for node "StatefulPartitionedCall/StatefulPartitionedCall/Any".

[ ERROR ]  Input 0 of node StatefulPartitionedCall/StatefulPartitionedCall/Any was passed int32 from StatefulPartitionedCall/StatefulPartitionedCall/Equal_port_0_ie_placeholder:0 incompatible with expected bool.

 

which is weird because I do not have bool input. I was wondering if you could help me in this issue.

Operating system linux ubuntu

Openvino, Openvino-dev, Openvino-tensorflow (all 2022.3.0)

Tensorflow 2.9.1

 

Thanks.

 

 

0 Kudos
2 Replies
Zulkifli_Intel
Moderator
467 Views

Hello Milad_n,

Thank you for contacting us.

 

Please share your model with us for replication purposes. In the meantime, please try to downgrade the TensorFlow 2 version from 2.9.1 to 2.8 and see if it can solve the issue.

 

Sincerely,

Zulkifli 


0 Kudos
Zulkifli_Intel
Moderator
409 Views

Hello Milad_n,

Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.

 

Sincerely,

Zulkifli 


0 Kudos
Reply