# tf_agents.utils.common.log_probability

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/utils/common.py#L683-L714) |

Computes log probability of actions given distribution.

    tf_agents.utils.common.log_probability(
        distributions, actions, action_spec
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `distributions` | A possibly batched tuple of distributions. |
| `actions` | A possibly batched action tuple. |
| `action_spec` | A nested tuple representing the action spec. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A Tensor representing the log probability of each action in the batch. ||

<br />