Thank you for your response.
But when I use the give code and plugin Imagenet dataset, it’s giving me some error because of the different structure of validation dataset, as directory val does not contain subfolders (unlike train directory) but the files only and this code expects subfolders than images. Please let me know where am I doing a mistake.
Errors:
File “”, line 1, in 
runfile(’/home/spyder_workspace/work/w_cuda/Imagenet/imagenet_training.py’, wdir=’/home//spyder_workspacework/w_cuda/Imagenet’)
File “/home/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”, line 714, in runfile
execfile(filename, namespace)
File “/home/anaconda3/lib/python3.5/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”, line 89, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)
File “/home/spyder_workspace/work/w_cuda/Imagenet/imagenet_training.py”, line 410, in 
main()
File “/home/spyder_workspace/work/w_cuda/Imagenet/imagenet_training.py”, line 234, in main
normalize,
File “/home/anaconda3/lib/python3.5/site-packages/torchvision/datasets/folder.py”, line 178, in init
target_transform=target_transform)
File “/home/anaconda3/lib/python3.5/site-packages/torchvision/datasets/folder.py”, line 79, in init
"Supported extensions are: " + “,”.join(extensions)))
RuntimeError: Found 0 files in subfolders of: /home/brijraj/Downloads/ILSVRC/Data/CLS-LOC/val/
Supported extensions are: .jpg,.jpeg,.png,.ppm,.bmp,.pgm,.tif