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

Traceback (most recent call last): File "train.py", line 531, in <module> train(hyp, opt, device, tb_writer, wandb) File "train.py", line 297, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/content/yolov5/utils/loss.py", line 117, in __call__ tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/content/yolov5/utils/loss.py", line 211, in build_targets indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices RuntimeError: result type Float can't be cast to the desired output type long int CPU times: user 204 ms, sys: 34.8 ms, total: 239 ms Wall time: 26.9 s Training is not happening! #1

Open
HassanBinHaroon opened this issue Jul 26, 2022 · 0 comments

Comments

@HassanBinHaroon
Copy link

It seems that the colab file needs to be fixed a little bit. Training is not getting started and results are not generating. I cannot evaluate it and cannot fine-tune it for my own application.

Kindly guide so I can run it smoothly.

Thanks!
Screenshot from 2022-07-26 12-36-09

@HassanBinHaroon HassanBinHaroon changed the title Traceback (most recent call last): File "train.py", line 531, in <module> train(hyp, opt, device, tb_writer, wandb) File "train.py", line 297, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/content/yolov5/utils/loss.py", line 117, in __call__ tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/content/yolov5/utils/loss.py", line 211, in build_targets indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices RuntimeError: result type Float can't be cast to the desired output type long int CPU times: user 204 ms, sys: 34.8 ms, total: 239 ms Wall time: 26.9 s Traceback (most recent call last): File "train.py", line 531, in <module> train(hyp, opt, device, tb_writer, wandb) File "train.py", line 297, in train loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size File "/content/yolov5/utils/loss.py", line 117, in __call__ tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets File "/content/yolov5/utils/loss.py", line 211, in build_targets indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices RuntimeError: result type Float can't be cast to the desired output type long int CPU times: user 204 ms, sys: 34.8 ms, total: 239 ms Wall time: 26.9 s Training is not happening! Jul 26, 2022
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