tensorflow / tensorflow/models

AttributeError: apply_conv_hyperparams_to_heads

Open
#10,007 0 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

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/model_main_tf2.py

2. Describe the bug

After running the command for training the model in the GCloud AI Platform, the attribute error o apply_conv_hyperparams_to_heads occur which stops the model from training

3. Steps to reproduce

Steps to reproduce the behavior.

PIPELINE_CONFIG_PATH=model_6/ssd_efficientdet_d0_512x512_coco17_tpu-8.config
MODEL_DIR=model_6/model_dir   
cp object_detection/packages/tf2/setup.py .
gcloud ai-platform jobs submit training banner_v6_`date +%m_%d_%Y_%H_%M_%S` \
    --runtime-version 2.1 \
    --python-version 3.7 \
    --job-dir=gs://${MODEL_DIR} \
    --package-path ./object_detection \
    --module-name object_detection.model_main_tf2 \
    --region us-central1 \
    --scale-tier BASIC_GPU \
    -- \
    --model_dir=gs://${MODEL_DIR} \
    --pipeline_config_path=gs://${PIPELINE_CONFIG_PATH} \
    --checkpoint_dir=gs://${MODEL_DIR}

4. Expected behavior

I expected the model to train

5. Additional context

master-replica-0
"Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/.local/lib/python3.7/site-packages/object_detection/model_main_tf2.py", line 113, in <module>
    tf.compat.v1.app.run()
  File "/root/.local/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 303, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/root/.local/lib/python3.7/site-packages/object_detection/model_main_tf2.py", line 88, in main
    wait_interval=300, timeout=FLAGS.eval_timeout)
  File "/root/.local/lib/python3.7/site-packages/object_detection/model_lib_v2.py", line 1095, in eval_continuously
    model_config=model_config, is_training=True)
  File "/root/.local/lib/python3.7/site-packages/object_detection/builders/model_builder.py", line 1200, in build
    add_summaries)
  File "/root/.local/lib/python3.7/site-packages/object_detection/builders/model_builder.py", line 417, in _build_ssd_model
    add_background_class=ssd_config.add_background_class)
  File "/root/.local/lib/python3.7/site-packages/object_detection/builders/box_predictor_builder.py", line 937, in build_keras
    config_box_predictor.apply_conv_hyperparams_to_heads),
AttributeError: apply_conv_hyperparams_to_heads

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): GCP AI platform
  • Mobile device name if the issue happens on a mobile device:
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below): 2.1.0
  • Python version:3.7
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory: n1-standard-8 with one k80 GPU

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.