def entropy(self, logits):
probs = torch.exp(logits)<EOL>entropy = - torch.sum(probs * logits, dim=-<NUM_LIT:1>)<EOL>return entropy<EOL>
Categorical distribution entropy calculation - sum probs * log(probs)