def compute_entropy_loss(logits):
    policy = tf.nn.softmax(logits)
    log_policy = tf.nn.log_softmax(logits)
    entropy_per_timestep = tf.reduce_sum(((- policy) * log_policy), axis=(- 1))
    return (- tf.reduce_sum(entropy_per_timestep))
def compute_entropy_loss(logits):
    policy = tf.nn.softmax(logits)
    log_policy = tf.nn.log_softmax(logits)
    entropy_per_timestep = tf.reduce_sum(((- policy) * log_policy), axis=(- 1))
    return (- tf.reduce_sum(entropy_per_timestep))