Hello Hamza!



 hamzarawal:

when I apply softmax to predicted probabilities, all the classes are assigned the same probability. For example for a 9 class problem, the output for each class is 0.111111.


This sounds odd and is well worth investigating.
Could you run your system and print out the the values before they go
into softmax()?  Then make a short, self-contained, runnable script
that uses those values to illustrate your issue.
I have in mind something like this:
import torch
print (torch.__version__)

my_values = torch.FloatTensor (<my_nine_values_that_I_printed_out>)
my_min, my_argmin = my_values.min (dim = 0)
print  (my_min, my_argmin)
my_max, my_argmax = my_values.max (dim = 0)
print  (my_max, my_argmax)
print  (my_max - my_min)

my_values = torch.nn.functional.softmax (my_values, dim = 0)
my_min, my_argmin = my_values.min (dim = 0)
print  (my_min, my_argmin)
my_max, my_argmax = my_values.max (dim = 0)
print  (my_max, my_argmax)
print  (my_max - my_min)

Best.
K. Frank