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

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

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

# softmax

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

`softmax(input: Tensor, dim: Long = -1L, dtype: DType = DType.UNDEFINED)`: the `softmax` operator. Softmax along `dim`, computed stably (max-subtracted).