Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.utils.common.entropy

View source on GitHub

Computes total entropy of distribution.

tf_agents.utils.common.entropy(
    distributions, action_spec
)

Args:

  • distributions: A possibly batched tuple of distributions.
  • action_spec: A nested tuple representing the action spec.

Returns:

A Tensor representing the entropy of each distribution in the batch. Assumes actions are independent, so that marginal entropies of each action may be summed.