parameters: (a, b, name=None)
docstring: Calculate the batched KL divergence KL(a || b) with a, b OneHotCategorical.
  
    Args:
      a: instance of a OneHotCategorical distribution object.
      b: instance of a OneHotCategorical distribution object.
      name: (optional) Name to use for created operations.
        default is "kl_categorical_categorical".
  
    Returns:
      Batchwise KL(a || b)
docstring_summary: Calculate the batched KL divergence KL(a || b) with a, b OneHotCategorical.
docstring_tokens: Calculate the batched KL divergence KL ( a || b ) with a b OneHotCategorical .
function: def _kl_categorical_categorical(a, b, name=None):
    """Calculate the batched KL divergence KL(a || b) with a, b OneHotCategorical.
  
    Args:
      a: instance of a OneHotCategorical distribution object.
      b: instance of a OneHotCategorical distribution object.
      name: (optional) Name to use for created operations.
        default is "kl_categorical_categorical".
  
    Returns:
      Batchwise KL(a || b)
    """
    with ops.name_scope(name, "kl_categorical_categorical", values=[
        a.logits, b.logits]):
      # sum(p ln(p / q))
      return math_ops.reduce_sum(
          nn_ops.softmax(a.logits) * (nn_ops.log_softmax(a.logits)
                                      - nn_ops.log_softmax(b.logits)),
          axis=-1)
function_tokens: def _kl_categorical_categorical ( a , b , name = None ) : with ops . name_scope ( name , "kl_categorical_categorical" , values = [ a . logits , b . logits ] ) : # sum(p ln(p / q)) return math_ops . reduce_sum ( nn_ops . softmax ( a . logits ) * ( nn_ops . log_softmax ( a . logits ) - nn_ops . log_softmax ( b . logits ) ) , axis = - 1 )