ManishSharma:

Now , i want to segregate these 20k images into 10 diff folder based on their respective class present in .csv file


You could load the .csv file via e.g. pandas and copy the files using the class id, if I understand your use case correctly. PyTorch doesn’t provide utilities to copy or move data.
Alternatively, you could also write a custom Dataset and load the files using your custom logic as described here 3.