Skip To Main Content
Support Knowledge Base

Unable to Convert TensorFlow* (TF) Saved Model (.Pb) Format into Intermediate Representation (IR)

Content Type: Error Messages   |   Article ID: 000094816   |   Last Reviewed: 05/30/2023

Description

  • Converted custom TensorFlow model with the commands below:

    mo --input_model saved_model.pb --input_shape [1,3,130,206] --reverse_input_channels

  • Encountered error:

    [ FRAMEWORK ERROR ] Cannot load input model: TensorFlow cannot read the model file:

    "\openvino_notebooks\notebooks\101-tensorflow-to-openvino\model\roi_train_model\saved_model.pb" is incorrect TensorFlow model file.
    The file should contain one of the following TensorFlow graphs:

    1. frozen graph in text or binary format
    2. inference graph for freezing with checkpoint (--input_checkpoint) in text or binary format
    3. meta graph

Resolution

For conversion of the Saved Model model format, the directory should have these components:

  1. A SavedModel Protocol Buffer
    • saved_model.pb/.pbtxt 
      • graph definitions as MetaGraphDef
  2. Assets
    • Contains auxiliary files such as vocabularies
  3. Extra Assets
    • Subfolder where higher-level libraries and users can add their own assets that coexist with the model but aren't loaded by the graph.
  4. Variables
    • Includes outputs from Tensorflow Saver

Additional information

Related Products

This article applies to 1 products.