What is the list of Classes for any Pre-Trained Model

Hi,

I have been using the VGG19 and DenseNet161 pretrained model for some time now. Actually, I wish to know the list of the classes these models are trained on (especially DenseNet model).

If you just load the model:

loaded_model = torchvision.models.densenet161(pretrained=True)
loaded_model.eval()

and if I predict an image to this

loaded_model(img)

I want to know, which class it has the model predicted it to (not the index, I got the index)

In other words I need the list of the classes that DenseNet was trained on so as I can Map each 1000 classes to the list.

Thank You!

The models were trained on ImageNet and you can find the mapping in this thread.

Thank a lot :slight_smile: