[−][src]Function tch::vision::imagenet::load_from_dir
pub fn load_from_dir<T: AsRef<Path>>(dir: T) -> Fallible<Dataset>
Loads a dataset from a directory.
This assumes that the directory contains two subdirectories named train and val. In each of these datasets, there should be a subdirectory per class named in the same way. The ImageNet normalization is applied, image are resized to 224x224.