Skip to content

can't export the trained model for inference #2427

@crazyqg

Description

@crazyqg

Dear Experts:

I am trying to export the trained model for inference:
(tensorflow) [root@SZX1000358305 models]# python object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path object_detection/faster_rcnn_resnet101_pets.config --trained_checkpoint_prefix object_detection/ --output_directory output_inference_graph.pb

But I encountered a series of errors;

2017-09-21 18:51:27.028847: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open ./object_detection: Failed precondition: object_detection: perhaps your file is in a different file format and you need to use a different restore operator?
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for object_detection/
[[Node: save/RestoreV2_579 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_save/Const_0_0, save/RestoreV2_579/tensor_names, save/RestoreV2_579/shape_and_slices)]]

It says that can not find the necessary files under object-detection, but actually the model.ckpt* & checkpoint & graph.pbtxt are there,

(tensorflow) [root@SZX1000358305 models]# ls object_detection/model.ckpt-200.
model.ckpt-200.data-00000-of-00001 model.ckpt-200.index model.ckpt-200.meta
(tensorflow) [root@SZX1000358305 models]# ls object_detection/model.ckpt-200.*
object_detection/model.ckpt-200.data-00000-of-00001 object_detection/model.ckpt-200.index object_detection/model.ckpt-200.meta
(tensorflow) [root@SZX1000358305 models]# ls object_detection/checkpoint
object_detection/checkpoint
(tensorflow) [root@SZX1000358305 models]# ls object_detection/graph.pbtxt
object_detection/graph.pbtxt
(tensorflow) [root@SZX10003583

Any idea what's the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions