# tf_agents.utils.common.transpose_batch_time

<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#L1212-L1235) |

Transposes the batch and time dimensions of a Tensor.

    tf_agents.utils.common.transpose_batch_time(
        x
    )

If the input tensor has rank \< 2 it returns the original tensor. Retains as
much of the static shape information as possible.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A Tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| x transposed along the first two dimensions. ||

<br />