Function tch::vision::imagenet::load_image_and_resize[][src]

pub fn load_image_and_resize<T: AsRef<Path>>(
    path: T,
    w: i64,
    h: i64
) -> Result<Tensor, TchError>

Loads an image from a file and resize it to the specified width and height. This applies the ImageNet normalization.