Expected all tensors to be on the same devices #1950
Unanswered
DickyAdi
asked this question in
CompVision
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my first time in object detection task and pytorch lightning also torchmetrics.
When computing the IoU on the validation step, sometimes in the first few epochs the code run fine without any error however after a few epoch there's an error saying "Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument tensors in method wrapper_cat)." How does that happen after the first few epochs run perfectly fine?
Here i provide all the lightning, lightning data module, and the error stack trace
Pytorch Custom Dataset
Lightning Data Module
Lightning Module
PL Trainer
Error Stack Trace
Strange things (Focus on the progress bar and batch, it runs perfectly fine in the first few batch)
Beta Was this translation helpful? Give feedback.
All reactions