<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#L6945-L6964) |

Return the product of tensor elements over a given axis.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.prod(
        x, axis=None, keepdims=False, dtype=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `axis` | Axis or axes along which a product is performed. The default, `axis=None`, will compute the product of all elements in the input tensor. |
| `keepdims` | If this is set to `True`, the axes which are reduce are left in the result as dimensions with size one. |
| `dtype` | Data type of the returned tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Product of elements of `x` over the given axis or axes. ||

<br />