LogSoftmax

The operator computes the log of softmax values for the given input: LogSoftmax(input, axis) = Log(Softmax(input, axis=axis)) The “axis” attribute indicates the dimension along which LogSoftmax will be performed. The output tensor has the same shape and contains the LogSoftmax values of the correspo…

Abstract Signature:

LogSoftmax(input: Tensor, axis: int)

PyTorch

API: torch.nn.modules.activation.LogSoftmax
Strategy: Direct Mapping

Apple MLX

API: mlx.nn.layers.activations.LogSoftmax
Strategy: Direct Mapping