# tf_agents.utils.nest_utils.stack_nested_tensors

<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/nest_utils.py#L816-L828) |

Stacks a list of nested tensors along the dimension specified.

    tf_agents.utils.nest_utils.stack_nested_tensors(
        tensors, axis=0
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensors` | A list of nested tensors to be stacked. |
| `axis` | the axis along which the stack operation is applied. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A stacked nested tensor. ||

<br />