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

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

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

# mean

[common]\
fun [mean](mean.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)

`mean(input: Tensor, dims: LongArray = longArrayOf(), keepdim: Boolean = false, dtype: DType = DType.UNDEFINED)`: the `mean` operator. Arithmetic mean of `input` over `dims`. Empty `dims` averages every element. `dtype` selects the output (and accumulation) dtype; the default keeps `input`'s.