When starting the training of yolov9-e or yolov9-c I always get this error:
your textTraceback (most recent call last):
File "/content/yolov9/train.py", line 634, in
main(opt)
File "/content/yolov9/train.py", line 528, in main
train(opt.hyp, opt, device, callbacks)
File "/content/yolov9/train.py", line 304, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "/content/yolov9/utils/loss_tal.py", line 168, in call
pred_distri, pred_scores = torch.cat([xi.view(feats[0].shape[0], self.no, -1) for xi in feats], 2).split(
File "/content/yolov9/utils/loss_tal.py", line 168, in
pred_distri, pred_scores = torch.cat([xi.view(feats[0].shape[0], self.no, -1) for xi in feats], 2).split(
AttributeError: 'list' object has no attribute 'view'
I am trying to train it using the code snippet from the roboflow platform. Based on the videos I watched nobody got this error when training these two models using the basic code snipped of roboflow.
I tried clearing the GPU memory with: import torch import os
torch.cuda.empty_cache() os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'expandable_segments:True'