Skip to main content

softmax_raw

Function softmax_raw 

Source
pub fn softmax_raw(data: &[f64], out: &mut [f64], outer: usize, n: usize)
Expand description

Softmax over the last dimension of a contiguous buffer.

data is the input (length = outer * n), out is the output. Applies two-pass stable softmax per row of length n.