If you output is returned as [batch_size, nb_classes] (which would be the default for a classification use case), then softmax(output, dim=1) is the right approach, since the sum in dim1 will be 1.
Each row (which corresponds to a sample in the batch) will contain the probabilities for each class.