Target and output shape/type for binary classification using ...
stackoverflow.com › questions › 66416878Mar 01, 2021 · Binary classification is slightly different than multi-label classification: while for multilabel your model predicts a vector of "logits", per sample, and uses softmax to converts the logits to probabilities; In the binary case, the model predicts a scalar "logit", per sample, and uses the sigmoid function to convert it to class probability. In pytorch the softmax and the sigmoind are "folded" into the loss layer (for numerical stability considerations) and therefore there are different ...