Skip to main content

pre

Function pre 

Source
pub fn pre(
    weights: &HyperConnectionPreWeights,
    x: &[Vec<f32>; 4],
    rms_norm_eps: f32,
    sinkhorn_iters: u32,
    hc_eps: f32,
) -> (Vec<f32>, [f32; 4], [[f32; 4]; 4])
Expand description

build_hc_pre: merges hc residual streams into one sub-layer input, plus the post gate and Sinkhorn-normalized comb matrix needed by post afterward. Returns (merged_input, post_gate, comb_matrix).