LogSoftmaxΒΆ

Applies the LogSoftmax function to an n-dimensional input Tensor.

Abstract Signature:

LogSoftmax(input: Tensor, dim: int = -1)

PyTorch

API: torch.nn.functional.log_softmax
Strategy: Direct Mapping

JAX (Core)

API: jax.nn.log_softmax
Strategy: Direct Mapping

NumPy

API: scipy.special.log_softmax
Strategy: Direct Mapping

Keras

API: keras.ops.log_softmax
Strategy: Direct Mapping

TensorFlow

API: tf.nn.log_softmax
Strategy: Direct Mapping

Apple MLX

API: mlx.nn.layers.activations.LogSoftmax
Strategy: Macro 'mlx.core.log(mlx.core.softmax({input}, axis={dim}))'

Flax NNX

API: jax.nn.log_softmax
Strategy: Direct Mapping

PaxML / Praxis

API: jax.nn.log_softmax
Strategy: Direct Mapping