Skip to main content

ffn_tensors

Function ffn_tensors 

pub fn ffn_tensors(
    input_size: usize,
    hidden_size: usize,
    output_size: usize,
    seed: u64,
) -> (Vec<f32>, Vec<f32>, Vec<f32>)
Expand description

Deterministic FFN test tensors. Weights are scaled by 1/sqrt(fan_in) so the pre-activations stay O(1) and GPU/CPU agree within a modest tolerance.