class_docstr: Categorical distribution for discrete action spaces.
docstr: Returns:
      entropy: A float32 tensor with shape [BATCH_SIZE] of entropy of self policy distribution.
docstr_tok: ["Returns",":","entropy",":","A","float32","tensor","with","shape","[","BATCH_SIZE","]","of","entropy","of","self","policy","distribution","."]
code: def entropy(self):
      """
      Returns:
          entropy: A float32 tensor with shape [BATCH_SIZE] of entropy of self policy distribution.
      """
      logits = self.logits - layers.reduce_max(self.logits, dim=1)
      e_logits = layers.exp(logits)
      z = layers.reduce_sum(e_logits, dim=1)
      prob = e_logits / z
      entropy = -1.0 * layers.reduce_sum(
          prob * (logits - layers.log(z)), dim=1
      )
  
      return entropy
  
imports: from parl.core.fluid import layers
label_desc: Use image node_id 3 for calling the CategoricalDistribution obj's underlying member method code with example usage: obj.entropy() and returns: entropy