Softmax activation function

Hi, I want to know how Soft max() function works, we get probabilities vector length equal to number of classes but how it knows 4 index is for coat in fashion Mnist and 5 for sandle.
My question is how we define which column is for which label can we change it.?

Neither the softmax method nor the model “knows” anything about the label.
You, as the researcher, create the dataset and create the input-output mapping, which the model tries to learn. This would also mean that you are free to remap any labels, as long as it’s consistent for all samples in the dataset.
The predictions of the model would also give you the logits (or probabilities assuming you apply softmax on them), which can then be mapped to the class index via torch.argmax. The interpretation of this class index to a class name also defined by the input-output mapping.