Input Shape error while training yolov4_tiny model

Please provide the following information when requesting support.

• Hardware (T4/V100/Xavier/Nano/etc) : A6000
• Network Type (Detectnet_v2/Faster_rcnn/Yolo_v4/LPRnet/Mask_rcnn/Classification/etc) : yolov4_tiny
• TLT Version (Please run “tlt info --verbose” and share “docker_tag” here) : 5.3.0
• Training spec file(If have, please share here)
• How to reproduce the issue ? (This is for errors. Please share the command line and the detailed log here.)

Getting the following error while training the yolov4_tiny model :

INFO: Starting Training Loop.
Epoch 1/500
 1/70 [..............................] - ETA: 20:18 - loss: 4004.7041INFO: Cannot feed value of shape (8, 5175, 21) for Tensor 'Placeholder_302:0', which has shape '(?, 6000, 21)'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/yolo_v4/scripts/train.py", line 165, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py", line 717, in return_func
    raise e
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/utils.py", line 705, in return_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/yolo_v4/scripts/train.py", line 161, in main
    raise e
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/yolo_v4/scripts/train.py", line 143, in main
    run_experiment(
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/yolo_v4/scripts/train.py", line 95, in run_experiment
    model.train(verbose)
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/yolo_v4/models/yolov4_model.py", line 702, in train
    self.keras_model.fit(
  File "/usr/local/lib/python3.8/dist-packages/keras/engine/training.py", line 1027, in fit
    return training_arrays.fit_loop(self, f, ins,
  File "/usr/local/lib/python3.8/dist-packages/keras/engine/training_arrays.py", line 160, in fit_loop
    callbacks.on_batch_end(step_index, batch_logs)
  File "/usr/local/lib/python3.8/dist-packages/keras/callbacks.py", line 115, in on_batch_end
    callback.on_batch_end(batch, logs)
  File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/callbacks/auto_class_weighting_callback.py", line 55, in on_batch_end
    batch_loss = K.get_session().run(self.loss_ops[2],
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/client/session.py", line 955, in run
    result = self._run(None, fetches, feed_dict, options_ptr,
  File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/client/session.py", line 1153, in _run
    raise ValueError(
ValueError: Cannot feed value of shape (8, 5175, 21) for Tensor 'Placeholder_302:0', which has shape '(?, 6000, 21)'
Execution status: FAIL
2024-08-02 06:17:46,188 [TAO Toolkit] [INFO] nvidia_tao_cli.components.docker_handler.docker_handler 363: Stopping container.

Following is training spec file & training log file .
yolo_v4_tiny_spec_rsf.txt (3.2 KB)
yolov4_tiny_training_log.txt (36.7 KB)

To narrow down, could you set enable_auto: False or follow YOLOv4 - NVIDIA Docs to check if it works?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.