ammalikwaterloo:

loss = model(imgs[j * n:j * n + n].to(device), targets_j, requestPrecision=True, weight=class_weights, epoch=epoch) loss2 = model2(imgs[j * n:j * n + n].to(device2), targets_j, requestPrecision=True, weight=class_weights2, epoch=epoch)


I think the targets are not sent to two different GPUs correctly. Same targets are used for both models.