<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/numpy.py#L2423-L2439) |

Return the cumulative product of elements along a given axis.

#### View aliases


**Main aliases**

[`tf.keras.ops.numpy.cumprod`](https://www.tensorflow.org/api_docs/python/tf/keras/ops/cumprod)

<br />

    tf.keras.ops.cumprod(
        x, axis=None, dtype=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `axis` | Axis along which the cumulative product is computed. By default the input is flattened. |
| `dtype` | dtype of returned tensor. Defaults to x.dtype. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Output tensor. ||

<br />