-
Notifications
You must be signed in to change notification settings - Fork 96
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
RuntimeError: result type Float can't be cast to the desired output type long int #36
Comments
Hey Im currently getting the same error, did you find a way to fix it? @XinzeLee do you know how to fix this? |
Getting same error.Any fix for this? |
I have found that modifying the offending line in loss.py to be: indices.append((b, a, gj.clamp_(0, int(gain[3].item()) - 1), gi.clamp_(0, int(gain[2].item()) - 1))) # image, anchor, grid indices allows it to run training. I am still verifying if the training results in a correct model. |
Can you capture the screen of training for reference ? |
In loss.py (line 173 ), gain = torch.ones(7, device=targets.device) → gain = torch.ones(7, device=targets.device).long() |
Run this command before python setup.py install :
|
Facing error while training.
Training command: !python polygon_train.py --weights yolov5s.pt --cfg polygon_yolov5s_ucas.yaml
--data data/custom.yaml --hyp hyp.ucas.yaml --img-size 1024
--epochs 3 --batch-size 12 --noautoanchor --polygon --cache
The text was updated successfully, but these errors were encountered: