Skip to main content

patchify

Function patchify 

Source
pub fn patchify(latent: &[f32], c: usize, h: usize, w: usize) -> Vec<f32>
Expand description

latent [c, h, w] → tokens [(h/2)·(w/2), 4c], feature (dy·2+dx)·c + ch.