Leroy_Freyler:

However, I have found that I can use the Softmax function for this just as well and the result is the same.


Are you applying torch.exp on the inputs before? If not, dividing by the sum alone shouldn’t yield the same output as the softmax.
However, as I’m not familiar with your use case, it’s good to hear you can use built-in methods.