pub fn softmax<T: Tensor<Dtype = f32>>(t: T) -> T
Expand description

Computes the softmax function. Equivalent to t.log_softmax().exp() or exp(log_softmax(t)) or exp(t) / sum(exp(t))

See logsumexp() and log_softmax() for related functions.