Function tch::vision::imagenet::load_image_and_resize_from_memory
source · pub fn load_image_and_resize_from_memory(
img_data: &[u8],
w: i64,
h: i64
) -> Result<Tensor, TchError>
Expand description
Loads an image from memory and resize it to the specified width and height. This applies the ImageNet normalization.