Skip to main content

encoder_forward

Function encoder_forward 

Source
pub fn encoder_forward(
    weights: &VisionEncoderWeights,
    cfg: &VisionConfig,
    patches: &[Vec<f32>],
) -> Vec<f32>
Expand description

Runs the full encoder (patch embed + every layer + final norm) for one image. Returns [n_patches, hidden_dim] flattened.