Thanks a lot!
I found another question:

when all my pics (n-class)are stored like this:
train/ant/***.jpg ***.jpg
train/snake/***.jpg ***.jpg
train/bear/***.jpg ***.jpg

when i use DataLoader,the label is 0–n-1,how do pytorch decide that which class is class 0,which is class 1 etc. According to the alphabet order?