Use digital labels as class names

Would the use of digital labels as class names, such as 1 for cat and 2 for dog, affect how pytorch predict?

Here is original datasets:

/tarin_set/dog/000.jpg
/tarin_set/dog/001.jpg
/tarin_set/dog/002.jpg

/tarin_set/cat/000.jpg
/tarin_set/cat/001.jpg
/tarin_set/cat/002.jpg

how about i change them to be:

/tarin_set/000/000.jpg
/tarin_set/000/001.jpg
/tarin_set/000/002.jpg

/tarin_set/001/000.jpg
/tarin_set/001/001.jpg
/tarin_set/001/002.jpg

The labels might be created in a different order, i.e. class0 is now in folder 000 and was cat before.
Besides that the training etc. should be the same.
If you are using torchvision.datasets.ImageFolder, have a look at this line of code where the folders are used to create the class indices.

Oh´╝îthanks for your answer.
i change the name of the folder and it works well.