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

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

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

# logSoftmax

[common]\
fun [logSoftmax](logSoftmax.md)(input: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = -1L, dtype: [DType](../DType/index.md) = DType.UNDEFINED): [Tensor](../Tensor/index.md)

`logSoftmax(input: Tensor, dim: Long = -1L, dtype: DType = DType.UNDEFINED)`: the `log_softmax` operator. Logarithm of the softmax along `dim`, computed stably (never `log(softmax(x))` in two passes).