tensorflow / tensorflow/models

Model training hangs

Open
#9,581 10 comments 1 reaction 3 assignees View on GitHub

@pkulzc is already working on this.

Since Dec 23, 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 currently trying to train an object detection model that uses the TensorFlow object detection API.
(I used this page for some guidance)

System information

Using Tensorflow version 2.3.0 under Google Colab.

The Colab can be found under https://colab.research.google.com/drive/1-c4ZvcZAN5dmtTNXAXleiefVBEEVRB8p?usp=sharing

Describe the current behavior

After I start to train my model through model_main_tf2.py the process "hangs". After some logs, it basically does not log or write anything in the console. It prints no steps or anything after this.

Describe the expected behavior

The training of the model should start and some logs should be written to display the current progress of the trained model.

Standalone code to reproduce the issue
https://colab.research.google.com/drive/1-c4ZvcZAN5dmtTNXAXleiefVBEEVRB8p?usp=sharing

This is the used pipeline.config

Other info / logs
These are the logs before the process "hangs".

2020-11-24 11:36:12.860350: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2020-11-24 11:36:16.666837: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2020-11-24 11:36:16.739962: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2020-11-24 11:36:16.740071: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (e5f060d04e25): /proc/driver/nvidia/version does not exist
2020-11-24 11:36:16.780569: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2300000000 Hz
2020-11-24 11:36:16.780823: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1d89100 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-24 11:36:16.780861: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:There are non-GPU devices in tf.distribute.Strategy, not using nccl allreduce.
W1124 11:36:16.788454 139718268630912 cross_device_ops.py:1202] There are non-GPU devices in tf.distribute.Strategy, not using nccl allreduce.
INFO:tensorflow:Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:CPU:0',)
I1124 11:36:16.788762 139718268630912 mirrored_strategy.py:341] Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:CPU:0',)
INFO:tensorflow:Maybe overwriting train_steps: None
I1124 11:36:16.794680 139718268630912 config_util.py:552] Maybe overwriting train_steps: None
INFO:tensorflow:Maybe overwriting use_bfloat16: False
I1124 11:36:16.794888 139718268630912 config_util.py:552] Maybe overwriting use_bfloat16: False
INFO:tensorflow:Reading unweighted datasets: ['/root/models/shoe-dataset/train.record']
I1124 11:36:16.882893 139718268630912 dataset_builder.py:148] Reading unweighted datasets: ['/root/models/shoe-dataset/train.record']
INFO:tensorflow:Reading record datasets for input file: ['/root/models/shoe-dataset/train.record']
I1124 11:36:16.884125 139718268630912 dataset_builder.py:77] Reading record datasets for input file: ['/root/models/shoe-dataset/train.record']
INFO:tensorflow:Number of filenames to read: 1
I1124 11:36:16.884304 139718268630912 dataset_builder.py:78] Number of filenames to read: 1
WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
W1124 11:36:16.884416 139718268630912 dataset_builder.py:86] num_readers has been reduced to 1 to match input file shards.
WARNING:tensorflow:From /root/models/research/object_detection/builders/dataset_builder.py:103: parallel_interleave (from tensorflow.python.data.experimental.ops.interleave_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.Dataset.interleave(map_func, cycle_length, block_length, num_parallel_calls=tf.data.experimental.AUTOTUNE) instead. If sloppy execution is desired, use tf.data.Options.experimental_deterministic.
W1124 11:36:16.899756 139718268630912 deprecation.py:323] From /root/models/research/object_detection/builders/dataset_builder.py:103: parallel_interleave (from tensorflow.python.data.experimental.ops.interleave_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.Dataset.interleave(map_func, cycle_length, block_length, num_parallel_calls=tf.data.experimental.AUTOTUNE) instead. If sloppy execution is desired, use tf.data.Options.experimental_deterministic.
WARNING:tensorflow:From /root/models/research/object_detection/builders/dataset_builder.py:222: DatasetV1.map_with_legacy_function (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.data.Dataset.map() W1124 11:36:16.966850 139718268630912 deprecation.py:323] From /root/models/research/object_detection/builders/dataset_builder.py:222: DatasetV1.map_with_legacy_function (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.data.Dataset.map()
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Create a tf.sparse.SparseTensor and use tf.sparse.to_dense instead.
W1124 11:36:24.396016 139718268630912 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Create a tf.sparse.SparseTensor and use tf.sparse.to_dense instead.
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201: sample_distorted_bounding_box (from tensorflow.python.ops.image_ops_impl) is deprecated and will be removed in a future version.
Instructions for updating:
seed2 arg is deprecated.Use sample_distorted_bounding_box_v2 instead.
W1124 11:36:27.515866 139718268630912 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201: sample_distorted_bounding_box (from tensorflow.python.ops.image_ops_impl) is deprecated and will be removed in a future version.
Instructions for updating:
seed2 arg is deprecated.Use sample_distorted_bounding_box_v2 instead.
WARNING:tensorflow:From /root/models/research/object_detection/inputs.py:281: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
W1124 11:36:29.340265 139718268630912 deprecation.py:323] From /root/models/research/object_detection/inputs.py:281: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.

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.