# tf_agents.trajectories.policy_step.get_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/trajectories/policy_step.py#L127-L134) |

Gets the CommonFields.LOG_PROBABILITY from info depending on type.

    tf_agents.trajectories.policy_step.get_log_probability(
        info: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/NestedTensorOrArray,
        default_log_probability: Optional[types.Float] = None
    ) -> https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Float