Based on what you’ve said, I think you misinterpret what the network “learn” on training (sorry if I am wrong). The network doesn’t know anything specific about the class (name or something); it only know that a picture may belong to the i-th class, where the order of classes is decided when training the network.
If it’s trained on ImageNet, you can find the ground truth by visiting ImageNet’s website 3. Also, you can “test” it (if it has acceptable accuracy) by feeding the dataset it is pretrained on, so you can get the order of the classes.