<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/core.py#L776-L797) |

Unpacks the given dimension of a rank-R tensor into rank-(R-1) tensors.

    tf.keras.ops.unstack(
        x, num=None, axis=0
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | The input tensor. |
| `num` | The length of the dimension axis. Automatically inferred if `None`. |
| `axis` | The axis along which to unpack. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A list of tensors unpacked along the given axis. ||

<br />

#### Example:

    x = keras.ops.array([[1, 2], [3, 4]])
    keras.ops.unstack(x, axis=0)
    [array([1, 2]), array([3, 4])]