tensorflow / tensorflow/models

Error when training object detection model

Open
#8,347 0 comments 0 reactions 1 assignee View on GitHub

@jch1 is already working on this.

Since May 12, 2020.

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

Description

I am using Ubuntu 18.04.2 on Win10.
I am trying to train the model but encountered this error.

File "/home/xqz5222/.local/lib/python2.7/site-packages/tensorflow/python/training/session_manager.py", line 220, in _restore_checkpoint
saver.restore(sess, ckpt.model_checkpoint_path)
File "/home/xqz5222/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1302, in restore
err, "a Variable name or other graph key that is missing")
tensorflow.python.framework.errors_impl.NotFoundError: Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key FirstStageFeatureExtractor/resnet_v1_101/block1/unit_1/bottleneck_v1/conv1/BatchNorm/beta not found in checkpoint
[[node save/RestoreV2 (defined at /home/xqz5222/tensorflow/models/research/object_detection/model_lib.py:518) ]]

Original stack trace for u'save/RestoreV2':
File "object_detection/model_main.py", line 109, in
tf.app.run()

This is the script that I used to train the model.

PIPELINE_CONFIG_PATH=object_detection/images/ssd_mobilenet_v2_coco.config
MODEL_DIR=object_detection/images
NUM_TRAIN_STEPS=20000
SAMPLE_1_OF_N_EVAL_EXAMPLES=1
python object_detection/model_main.py
--pipeline_config_path=${PIPELINE_CONFIG_PATH}
--model_dir=${MODEL_DIR}
--num_train_steps=${NUM_TRAIN_STEPS}
--sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES
--alsologtostderr

Thank you in advance!

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.