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

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

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

# logsumexp

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

`logsumexp(input: Tensor, dims: LongArray, keepdim: Boolean = false)`: the `logsumexp` operator. Numerically stable `log(sum(exp(x)))` over `dims`. Computed with the max-shift trick, so large magnitudes do not overflow. `dims` is required here (no reduce-all default).