Closed ChuangLee closed 2 years ago
The code below output Nan loss.
supconloss = SupConLoss(temperature=0.07).cuda() data = torch.randn((48, 128)) labels = torch.arange(0, 24, 0.5).int() loss = supconloss(data, labels) print(loss)
uh huh... may it's because there is no normalization. close
The code below output Nan loss.