Skip to main content

linear

Function linear 

Source
pub fn linear(
    x: &[f32],
    rows: usize,
    in_dim: usize,
    w_t: &[f32],
    out_dim: usize,
    b: &[f32],
) -> Result<Vec<f32>>
Expand description

out = x @ w_t + b where w_t is [in_dim, out_dim] (already transposed at load time by WeightMap::take_transposed).