How to know the name of the predicted class? As we know all, after training a neural network, each neuron in the output layer presents one class. These class are in a numeric format for example 0 for sunny 1 for overcast and 3 for rainy. after the prediction phase, the model print for example 1, how to know that 1 corresponds to the class overcast?
You as the designer of the network specify each class in the training example. You set e.g. a car class to label $0$ and another class to $1$. During training your classifier tries to map the inputs to the corresponding class which are those numbers where you have specified in the dataset. This phase is called encoding. After outputting the label, you should decode the label which is a trivial task!