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

IndexError: index 2 is out of bounds for dimension 1 with size 1 #414

Open
whuabin opened this issue Sep 7, 2022 · 0 comments
Open

IndexError: index 2 is out of bounds for dimension 1 with size 1 #414

whuabin opened this issue Sep 7, 2022 · 0 comments

Comments

@whuabin
Copy link

whuabin commented Sep 7, 2022

Traceback (most recent call last):
File "D:/deep_learning/PyTorch_YOLOv4-master/train.py", line 518, in
train(hyp, opt, device, tb_writer, wandb)
File "D:/deep_learning/PyTorch_YOLOv4-master/train.py", line 291, in train
loss, loss_items = compute_loss(pred, targets.to(device), model) # loss scaled by batch_size
File "D:\deep_learning\PyTorch_YOLOv4-master\utils\loss.py", line 108, in compute_loss
t[range(n), tcls[i]] = cp
IndexError: index 2 is out of bounds for dimension 1 with size 1
这个问题怎么解决啊 我训练单类型的时候不报错 但是训练多类型就报错了

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

1 participant