- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to convert tensorflow model into openvino bin/xml format.
I met this error: [ FRAMEWORK ERROR ] Cannot load input model: No variables to save
Can anyone help on this, the following is my command line:
/home/leo/openvino/ovsrc/openvino/model-optimizer/mo.py --framework=tf --data_type=FP32 --output_dir=/home/leo/openvino/modelzoo/open_model_zoo-master/tools/downloader/public/resnet-50-tf/FP32 --model_name=resnet-50-tf '--input_shape=[1,224,224,3]' '--mean_values=[103.94.116.78.123.68]' --input_model=/home/leo/openvino/modelzoo/open_model_zoo-master/tools/downloader/public/resnet-50-tf/resnet_v1-50.pb --input_checkpoint=/home/leo/openvino/modelzoo/open_model_zoo-master/tools/downloader/public/resnet-50-tf/resnet_v1_50.ckpt --reverse_input_channels
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leo,
Thanks for reaching out to us.
For your information, if you download resnet-50-tf model using model_downloader , you will only get the .pb file.
On my side, I’ve validated that your command line works well without adding this argument:
--input_checkpoint=/home/leo/openvino/modelzoo/open_model_zoo-master/tools/downloader/public/resnet-50-tf/resnet_v1_50.ckpt
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh
Thank your reply very much.
Yes, that ckpt file is what I added, the reason I add that is because if I only use the pb file, I tested the accuracy with MLPerf and Imagenet and find the accuracy is very low, only 1%. I don't know if the pb file is just the model structure or has the trained parameters, that is why I added the ckpt file.
What I thought is the pb file is just model structure and ckpt file contain the parameters. I don't know, do you think is that correct?
I download that ckpt from this link:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leo,
Greetings to you.
Ckpt file only saves the weights of the variables or the graph and mainly used for resuming the training whereas pb file saves everything about the model including custom objects.
By referring to your previous command line, you have satisfied the minimum required arguments for the Model Optimizer to convert the TensorFlow model into IR format. However, there are also few missing arguments which might be the reason for getting low accuracy.
You may find all the required model_optimizer arguments in this file:
<installed_dir>\deployment_tools\open_model_zoo\models\public\
resnet-50-tf\model.yml
These information are also available here:
On the other hand, I would like to share with you an easier way to convert the TensorFlow model into IR format without specify all the arguments which is converter.py.
python “<installed_dir\deployment_tools\tools\model_downloader\converter.py” –-name resnet-50-tf
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Leo,
This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Regards,
Peh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Peh
Thank you very much for help. The problem have been solved in my side.
Thanks
Leo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page