You should keep the probabilities as they are when inputting them in the loss function with their target. Moreover, if you are doing binary classification, you only need one neuron as your end layer (either it’s 1 or 0).  Another quick tip: don’t use the sigmoid function as the output of your nn model. Leave the output as it is and use torch.nn.BCEWithLogitsLoss as the loss function. It directly intergrates the sigmoid function and has better numerical stability.