spyrit.misc.statistics.data_loaders_ImageNet
- spyrit.misc.statistics.data_loaders_ImageNet(train_root, val_root=None, img_size=64, batch_size=512, seed=7, shuffle=False, normalize=True)[source]
- Args:
Both ‘train_root’ and ‘val_root’ need to have images in a subfolder shuffle=True to shuffle train set only (test set not shuffled)
The output of torchvision datasets are PILImage images in the range [0, 1]. We transform them to Tensors in the range [-1, 1]. Also RGB images are converted into grayscale images.