Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qiu13579 opened this issue Feb 23, 2024 · 9 comments
Closed

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

qiu13579 opened this issue Feb 23, 2024 · 9 comments

Comments

@qiu13579
Copy link

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'

@WongKinYiu
Copy link
Owner

YOLOv9 models should be trained with train_dual.py

@qiu13579
Copy link
Author

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

@WongKinYiu
Copy link
Owner

#1 (comment)

@qiu13579
Copy link
Author

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

@WongKinYiu
Copy link
Owner

For inference, please check #11 (comment).

@qiu13579
Copy link
Author

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?

@WongKinYiu
Copy link
Owner

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.

@qiu13579
Copy link
Author

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

@korkmazemin1
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants