code: def entropy(self, logits):
          
          probs = torch.exp(logits)
          entropy = - torch.sum(probs * logits, dim=-1)
          return entropy
docs: Categorical distribution entropy calculation - sum probs * log(probs)