Function dfdx::tensor_ops::log_softmax
source · [−]pub fn log_softmax<T: Reduce1<-1>>(t: T) -> T
Expand description
log(softmax(t))
in numerically stable way. Does t - logsumexp(t)
under the hood.
Pytorch equivalent: t.log_softmax(-1)
Related functions: logsumexp(), softmax()