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.