How to get the output probability distribution?

If you have binary classification (not (dog or cat), but (dog or others) ), i think softmax is not logical way. This post may help you. There are binary classification loss functions such as torch.nn.BCEWithLogitsLoss.