(rontolisp) docs
← Functions

linalg:log-softmax

(linalg:log-softmax array &key axis)

Returns the logarithm of linalg:softmax, computed as (x - max) - log(sum(exp(x - max))) rather than as the log of the softmax, so an exactly-zero weight gives -infinity instead of a NaN. The :axis rules are linalg:softmax's. This is the numerically stable half of a cross-entropy loss.