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' #74

Closed
s6658363 opened this issue Feb 26, 2024 · 1 comment
Closed

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

s6658363 opened this issue Feb 26, 2024 · 1 comment

Comments

@s6658363
Copy link

hey guys
i meet some difficulties in this program

main(opt)
main(opt)
File "F:\yolov9-main\yolov9-main\train.py", line 528, in main
train(opt.hyp, opt, device, callbacks)
File "F:\yolov9-main\yolov9-main\train.py", line 304, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "F:\yolov9-main\yolov9-main\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 "F:\yolov9-main\yolov9-main\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'
how should i fix it?

@Ysssssw
Copy link

Ysssssw commented Feb 26, 2024

#22 I used this method to solve the problem

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