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.

Failed to convert tensorflow model with negative input shape value

Wu__David
ビギナー
2,629件の閲覧回数

Hi,

I'm trying to convert a Keras model to OpenVINO format.

At first I used a tool to convert model to tensorflow then use mo_tf.py. But I got the following error:

[ ERROR ]  Shape [-1 64 64  3] is not fully defined for output 0 of "input_1". Use --input_shape with positive integers to override model input shapes.
[ ERROR ]  Cannot infer shapes or values for node "input_1".
[ ERROR ]  Not all output shapes were inferred or fully defined for node "input_1". 
 For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #40. 
[ ERROR ]  
[ ERROR ]  It can happen due to bug in custom shape infer function <function tf_placeholder_ext.<locals>.<lambda> at 0x7fdb614f9730>.
[ 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).

So I add --input_shape = "[1 64 64 3]" or "[64 64 3]" but got another error.

Could you please check the error? Or what tool you suggest to convert Keras?

The tool I use to convert keras to tensorflow and attached files are the models and log:

https://github.com/amir-abdi/keras_to_tensorflow

And the model:

https://github.com/shamangary/SSR-Net

 

Thanks.

David

0 件の賞賛
1 解決策
mahinlma
新規コントリビューター I
2,629件の閲覧回数

try

-b 1

 instead passing -input_shape

note:

-b / --batch : batch size 

 

元の投稿で解決策を見る

1 返信
mahinlma
新規コントリビューター I
2,630件の閲覧回数

try

-b 1

 instead passing -input_shape

note:

-b / --batch : batch size 

 

返信