tensorflow / tensorflow/models

NotImplementedError: must be implemented in descendants on train_loop method in object_detection.model_lib_v2

Open
#8,929 2 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

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

Description

NotImplementedError Traceback (most recent call last)
in ()
----> 1 train_loop(pipeline_config,model_dir,train_steps=10,checkpoint_every_n=100,checkpoint_max_to_keep=5,save_final_config=True)

2 frames
/usr/local/lib/python3.6/dist-packages/object_detection/model_lib_v2.py in train_loop(pipeline_config_path, model_dir, config_override, train_steps, use_tpu, save_final_config, checkpoint_every_n, checkpoint_max_to_keep, **kwargs)
530 # is the chief.
531 summary_writer_filepath = get_filepath(strategy,
--> 532 os.path.join(model_dir, 'train'))
533 summary_writer = tf.compat.v2.summary.create_file_writer(
534 summary_writer_filepath)

/usr/local/lib/python3.6/dist-packages/object_detection/model_lib_v2.py in get_filepath(strategy, filepath)
385 for the chief.
386 """
--> 387 if strategy.extended.should_checkpoint:
388 return filepath
389 else:

/usr/local/lib/python3.6/dist-packages/tensorflow/python/distribute/distribute_lib.py in should_checkpoint(self)
2325 def should_checkpoint(self):
2326 """Whether checkpointing is needed."""
-> 2327 raise NotImplementedError("must be implemented in descendants")
2328
2329 @Property

NotImplementedError: must be implemented in descendants

I am using the model SSD ResNet152 V1 FPN 640x640 from Tensorflow model zoo
Corresponding config file is being attached
config.txt

And I am using the direct method train_loop from object_detection.model_lib_v2

For conversion of Pascal VOC to tfrecord fromat is done using create_pascal_tf_record

I didn't understand the issue, any suggestions are welcome.
Thanks 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.