Function tch::vision::image::load_and_resize_from_memory
source · pub fn load_and_resize_from_memory(
img_data: &[u8],
out_w: i64,
out_h: i64
) -> Result<Tensor, TchError>
Expand description
Loads and resize an image from memory, preserve the aspect ratio by taking a center crop.