Error when training Object Detection model

When I get to the training step for my object detection model in Google Colab, I get the following error:

Traceback (most recent call last):
  File "./pytorch-YOLOv4/train.py", line 447, in <module>
    device=device, )
  File "./pytorch-YOLOv4/train.py", line 310, in train
    for i, batch in enumerate(train_loader):
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 345, in __next__
    data = self._next_data()
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 838, in _next_data
    return self._process_data(data)
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 881, in _process_data
    data.reraise()
  File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 394, in reraise
    raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 7.
Original Traceback (most recent call last):
  File "/content/pytorch-YOLOv4/dataset.py", line 382, in __getitem__
    out_bboxes1[:min(out_bboxes.shape[0], self.cfg.boxes)] = out_bboxes[:min(out_bboxes.shape[0], self.cfg.boxes)]
AttributeError: 'list' object has no attribute 'shape'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
    data = fetcher.fetch(index)
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/content/pytorch-YOLOv4/dataset.py", line 385, in __getitem__
    out_bboxes1[:min(out_bboxes.shape[0], self.cfg.boxes)] = out_bboxes[:min(out_bboxes.shape[0], self.cfg.boxes)]
ValueError: could not broadcast input array from shape (0) into shape (0,5)

I followed the tutorial exactly, with the only change I made is using my own dataset instead of the chess one. What should I do to solve this error?

Hi @kwasi_dp

Please fill out the new topic template so we may better assist you. You can find this template clicking new topic -> category -> community help, notebooks or find it copied pasted below:

Please share the following so we may better assist you:

1. Screen shot of your error
2. Copy/Paste of your code
3. What you've tried so far to debug

Thank you for the tip, I reposted following this format.