OK, I see. In that case check the dtype before calling self.transforms on the boxes (if used) and afterwards. If this doesn’t transform them back to float64, check the target['boxes'] = torch.stack(...) line.