Function tch::vision::image::load_and_resize
source · pub fn load_and_resize<T: AsRef<Path>>(
path: T,
out_w: i64,
out_h: i64
) -> Result<Tensor, TchError>
Expand description
Loads and resize an image, preserve the aspect ratio by taking a center crop.