Oh apologies, I’m also using PyTorch, for some reason I thought you were using Tensorflow.
In PyTorch, it can be done as follows:
from torch import nn

probabilities = nn.functional.softmax(predictions, dim=-1)
print(probabilities)