Hi Bing!



 bing:

Suppose model will predict the following probabilities - 0.14, 1.2, -0.3


Just to be precise, these are not “probabilities.”  (If they were, they
would be values between 0 and 1 that sum to 1.)  They are most
likely the output of a final Linear layer (with no subsequent non-linear
“activation”), and should be understood as raw-score logits.


how the index’s are mapped with the labels, like how do we know that the first index is mapping to the first label and similarly the other indexes too


The output of a model means whatever you train it to mean.
If your target values are “integer categorical labels,” and your
criterion (loss function) is CrossEntropyLoss, then you will
be training your model so that the[0] element of its output maps
to the class whose integer class label is 0, element [1] maps to
class label 1, and so on.
To reiterate, the relationship between the output of your model and
the class labels you use to train your model depends entirely on what
you train your model to do.
Best.
K. Frank