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