Implementing kernel
C++ engine symbols that back this Python API.Logarithm of softmax along dim: .
Computed as log(softmax(x)) — Lucid's softmax kernel is
max-stabilised, so this composite avoids most underflow you'd hit
from naive log(exp(x) / sum(exp(x))). Pair with
F.nll_loss for a numerically stable cross-entropy.
Parameters
Input logits of any shape.
dimint= NoneAxis along which the softmax is normalised. Default
-1.Returns
TensorSame shape and dtype as x.
See Also
softmax—the un-logged form.