I’m a 4th year CS student and as part of my engineering thesis I’m trying to recreate YOLO algorithm for object detection.
Despite making sure that both targets and inputs are converted to float and device before training I seem to experience this type of error and can’t solve it on my own.
So error you hit is in the backward. The first thing I would recommend to do for this is use the (very slow) ẁith torch.anomaly_detection() mode as it will give you the backtrace of the backward.
Glad you solved it. If you stare down the backtrace (in the bottom half) to find the bit that isn’t Jupyter nor PyTorch internals but your code, the crucial information is the line with no_object_loss = LAMBDA_NOOBJ * self.mse( so likely it was not_exists_object_filter that was not float.
Unsolicited advice: If you use triple backticks (```) before and after the code in forum posts, it’ll use better formatting.