PyTorch Loss Functions
torch.nn.functional.binary_cross_entropy
takes logistic sigmoid values as inputstorch.nn.functional.binary_cross_entropy_with_logits
takes logits as inputstorch.nn.functional.cross_entropy
takes logits as inputs (performslog_softmax
internally)torch.nn.functional.nll_loss
is likecross_entropy
but takes log-probabilities (log-softmax) values as inputs