class_docstr: Categorical probability distribution
docstr: compute entropy
docstr_tok: ["compute","entropy"]
code: def entropy(self):
      """compute entropy"""
      a0 = self.logits - tf.reduce_max(
          self.logits, axis=-1, keepdims=True
      )
      ea0 = tf.exp(a0)
      z0 = tf.reduce_sum(ea0, axis=-1, keepdims=True)
      p0 = ea0 / z0
      return tf.reduce_sum(p0 * (tf.log(z0) - a0), axis=-1)
  
imports: import tensorflow.compat.v1
  from .util import fc
label_desc: Use image node_id 7 for calling the CategoricalPd obj's underlying member method code with example usage: obj.entropy() and returns: tf