Function softmax
Source pub fn softmax(values: &[f32]) -> AttentionResult<Vec<f32>>
Expand description
Computes softmax over a slice of values.
Uses the numerically stable variant: softmax(x) = exp(x - max(x)) / sum(exp(x - max(x)))
§Arguments
§Returns
Softmax-normalized values