Загрузка
ImageNet 2012 Classification Dataset.
root (str or pathlib.Path) – Root directory of the ImageNet Dataset.
split (string, optional) – The dataset split, supports train, or val.
transform (callable, optional) – A function/transform that takes in a PIL image or torch.Tensor, depends on the given loader,
and returns a transformed version. E.g, transforms.RandomCrop
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
loader – A function to load an image given its path.
By default, it uses PIL as its image loader, but users could also pass in
torchvision.io.decode_image for decoding image data into tensors directly.
(sample, target) where target is class_index of the target class.