tensorflow / tensorflow/models

exporting inference graph value error

Open
#7,646 1 comment 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Jun 21, 2020.

models:research:odapi type:support
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

  • What is the top-level directory of the model you are using: research/object_detection
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (source or binary): google colab
  • TensorFlow version (use command below): 1.15.0-rc3
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:google colab
  • Exact command to reproduce: !python export_inference_graph.py --input_type=image_tensor --pipeline_config_path=training/ssd_mobilenet_v2_coco.config --trained_checkpoint_prefix=training/model.ckpt-1001 --output_directory=output

I am facing the issue with exporting graph using tensorflow object detection API running the command above.

Traceback (most recent call last):
  File "export_inference_graph.py", line 162, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "export_inference_graph.py", line 158, in main
    write_inference_graph=FLAGS.write_inference_graph)
  File "/content/drive/My Drive/OD/models-master/research/object_detection/exporter.py", line 489, in export_inference_graph
    write_inference_graph=write_inference_graph)
  File "/content/drive/My Drive/OD/models-master/research/object_detection/exporter.py", line 418, in _export_inference_graph
    trained_checkpoint_prefix=checkpoint_to_use)
  File "/content/drive/My Drive/OD/models-master/research/object_detection/exporter.py", line 327, in write_graph_and_checkpoint
    saver.restore(sess, trained_checkpoint_prefix)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/saver.py", line 1282, in restore
    checkpoint_prefix)
ValueError: The passed save_path is not a valid checkpoint: training/model.ckpt-1001

I am having this issue although having model.ckpt-1001 in the folder.
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.