Skip to main content

Mojo function

softmax

softmax[dtype: DType, simd_width: Int, rank: Int, static_shape: DimList](input: NDBuffer[dtype, rank, origin, static_shape], output: NDBuffer[dtype, rank, origin, static_shape], axis: Int)

softmax[: origin.set, //, dtype: DType, simd_width: Int, rank: Int, static_shape: DimList, input_fn: fn[Int, Int](IndexList[$1]) capturing -> SIMD[dtype, $0], target: StringSlice[StaticConstantOrigin] = "cpu"](shape: IndexList[rank], output: NDBuffer[dtype, rank, origin, static_shape], axis: Int, context: DeviceContextPtr = DeviceContextPtr())

Was this page helpful?