Skip to main content

pixels_to_tensor

Function pixels_to_tensor 

Source
pub fn pixels_to_tensor<B: Backend>(
    data: Vec<f32>,
    shape: [usize; 4],
    device: &Device<B>,
) -> Tensor<B, 4>
Expand description

Builds a [1, 3, H, W] pixel tensor from planar CHW f32 data (used by the runtime to hand media to embed_multimodal).