stable_softmax

Function stable_softmax 

Source
pub fn stable_softmax<T: Float>(values: &[T]) -> Vec<T>
Expand description

Stable softmax computation

Computes softmax(x) = exp(x) / sum(exp(x)) in a numerically stable way.