Skip to main content

patchify_video

Function patchify_video 

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

[C, T, H, W][T·(H/2)·(W/2), C·4], the 2×2 spatial patch flattened channel-major-outer as einsum("nctrhpwq->nthwcrpq").