Does it need ImageNet to be decompressed or in a .tar file?
imagenet_data = torchvision.datasets.ImageNet('imagenet_compressed.tar')

or
imagenet_data = torchvision.datasets.ImageNet('imagenet_decompressed_folder')

https://pytorch.org/vision/stable/datasets.html#imagenet 3