-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Yolov7-w6.pt custom training runtime error indices should be either in cpu or on the same device #1228
Comments
This answer can solve your problem: |
@d246810g2000 No, I need to use GPU. |
You have two solutions: Line 685 in 2596994
from_which_layer.append((torch.ones(size=(len(b),)) * i).to('cuda'))
Line 756 in 2596994
add a line after 756 to put fg_mask_inboxes on your cuda device fg_mask_inboxes = fg_mask_inboxes.to(torch.device('cuda'))
|
I am still getting the same error- Please find attached my loss.py file with the changes. Can you please check and let me know if I have missed something? |
Just a quick update, I also changed line no 1336 to |
could you send me the updated file I am still getting the same error |
I am still getting the same error- |
@rimaexo and @ayansaha280 please use attached loss file- |
For reference, I pulled the most recent version of YOLOv7 from main at 2023-05-23. I followed the suggestions above:
However, the same error occurs. Finally, I replaced the loss.py file with the one (loss_updated_w6.txt) shared by dsbyprateekg and it worked. I also tested e6e and it works too. |
Hi,
Custom training with the W6 weight file is giving me the following error in Colab:-
The text was updated successfully, but these errors were encountered: