About temperature
Z-MU-Z opened this issue · comments
Muzhi Zhu commented
Hi,
When I adjust the temperature, I observe a change in the relationship between the distributions. Specifically, when temperature=0.1, E(logitsA) is initially greater than E(logitsB), but when temperature=10, E(logitsA) becomes less than E(logitsB).
I use temp * torch.logsumexp(logits[:, :num_category] / temp, dim=1)
to computer energy E()
logits = torch.randn(7, num_category)
energy = temp * torch.logsumexp(logits[:, :num_category] / temp, dim=1)
Am I misunderstanding or implementing it incorrectly? I understand that temperature is only for smoothing and should not change the relative relationships, right?
wetliu commented
It is not just smoothing. The figure with temperature changes vs the FPR95 shows the relative different does change.