Hi Legoh and Othmane!



 omarfoq:

normally the columns of your matrix will be the result of some softmax operation


If your probabilities are, in fact, the result of softmax(), you can pretty
much avoid any instabilities by using pytorch’s torch.log_softmax()
to combine the two steps together.
Best.
K. Frank