Function tch::vision::imagenet::load_image_and_resize
source · pub fn load_image_and_resize<T: AsRef<Path>>(
path: T,
w: i64,
h: i64
) -> Result<Tensor, TchError>
Expand description
Loads an image from a file and resize it to the specified width and height. This applies the ImageNet normalization.