If you are using 2 output units for the binary classification use case and thus use torch.argmax to calculate the predicitons, you could use F.softmax to get the probabilities.
Note that you won’t need these probabilities to calculate the loss etc. if you are using nn.CrossEntropyLoss, but can of course inspect them.