---
title: "prod"
sidebar_label: "prod"
description: "Kotlin binding reference: prod."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[prod](prod.md)

# prod

[common]\
fun [prod](prod.md)(input: [Tensor](../Tensor/index.md), dims: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(), keepdim: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false, dtype: [DType](../DType/index.md) = DType.UNDEFINED): [Tensor](../Tensor/index.md)

`prod(input: Tensor, dims: LongArray = longArrayOf(), keepdim: Boolean = false, dtype: DType = DType.UNDEFINED)`: the `prod` operator. Product of `input`'s elements over `dims`. Empty `dims` multiplies every element. `dtype` widens the accumulation/output when set; the default keeps `input`'s dtype.