temperature_scaling
temperature_scaling copied to clipboard
Why do we need to expand temperature to match the size of logits?
In your code
# Expand temperature to match the size of logits
temperature = self.temperature.unsqueeze(1).expand(logits.size(0), logits.size(1))
return logits / temperature
Why not just doing something like
return logits / self.temperature