'Compute the symbolic KL divergence of two categorical distributions'

def kl_sym(self, old_dist_info_vars, new_dist_info_vars):

    old_prob_var = old_dist_info_vars['prob']
    new_prob_var = new_dist_info_vars['prob']
    ndims = old_prob_var.get_shape().ndims
    return tf.reduce_sum((old_prob_var * (tf.log((old_prob_var + TINY)) - tf.log((new_prob_var + TINY)))), axis=(ndims - 1))
