yolov9 icon indicating copy to clipboard operation
yolov9 copied to clipboard

AttributeError: 'list' object has no attribute 'view'

Open qiu13579 opened this issue 1 year ago • 8 comments

In loss_tal.py: pred_distri, pred_scores = torch.cat([xi.view(feats[0].shape[0], self.no, -1) for xi in feats], 2).split( (self.reg_max * 4, self.nc), 1) The error is as follows: AttributeError: 'list' object has no attribute 'view'

qiu13579 avatar Feb 23 '24 02:02 qiu13579

YOLOv9 models should be trained with train_dual.py

WongKinYiu avatar Feb 23 '24 02:02 WongKinYiu

What is the difference between train.py and train_dual.py In terms of using training methods ?

qiu13579 avatar Feb 23 '24 02:02 qiu13579

https://github.com/WongKinYiu/yolov9/issues/1#issuecomment-1958742287

WongKinYiu avatar Feb 23 '24 02:02 WongKinYiu

In general.py: device = prediction.device The error is as follows: AttributeError: 'list' object has no attribute 'device'

qiu13579 avatar Feb 23 '24 02:02 qiu13579

For inference, please check https://github.com/WongKinYiu/yolov9/issues/11#issuecomment-1960627261.

WongKinYiu avatar Feb 23 '24 02:02 WongKinYiu

What is the difference between yolov9-c.pt and gelan-c.pt?
In the train_dual.py, which weight file is commonly used to load pre training weights?

qiu13579 avatar Feb 23 '24 02:02 qiu13579

The details of GELAN and YOLOv9 are shown in the paper. Simply to say, YOLOv9 models contain additional aux branch for training. Our experiments are conduct with train-from-scratch strategy, so there are no pre-trained weights. If you want to fine-tune yolov9 on your dataset with train_dual.py, please use yolov9-c.pt.

WongKinYiu avatar Feb 23 '24 03:02 WongKinYiu

In the train_dual.py, if '--weights' = 'yolov9-c.pt' , is '--cfg' = 'yolov9-c.yaml' ?

qiu13579 avatar Feb 23 '24 03:02 qiu13579

The details of GELAN and YOLOv9 are shown in the paper. Simply to say, YOLOv9 models contain additional aux branch for training. Our experiments are conduct with train-from-scratch strategy, so there are no pre-trained weights. If you want to fine-tune yolov9 on your dataset with train_dual.py, please use yolov9-c.pt.

this is not a clear solution. you should give the gelan-e.yaml if u use train.py (for gelan) and if u use train_dual.py (thats mean without gelan) you should give normal yaml you can check on the github readme page.

korkmazemin1 avatar Jul 29 '24 22:07 korkmazemin1