Implementing kernel
C++ engine symbols that back this Python API.Softmax along dim — .
Dispatches to the engine's numerically stable softmax kernel
(max-subtraction baked in), so no caller-side stabilisation
is needed. Equivalent to lucid.nn.functional.softmax but
lives in the top-level lucid namespace for parity with
NumPy / SciPy-style usage.
Parameters
Input logits of any shape.
dimint= NoneAxis along which the softmax is normalised. Default
-1
(last axis).Returns
TensorSame shape and dtype as x. Each slice along dim sums to 1.
See Also
log_softmax—numerically safer when the result feeds anNLLLoss / cross-entropy downstream.