python - Stack Overflow
https://stackoverflow.com/questions/5806382623.09.2019 · Use CrossEntropyLoss if examples are associated with only one class, otherwise, use BCEWithLogitsLoss (whenever you have examples with multiple class labels). – Wasi Ahmad. Sep 23 '19 at 23:32. Add a comment | Your Answer Thanks for contributing an answer to Stack Overflow! Please be sure to answer the ...
BCE Loss vs Cross Entropy - vision - PyTorch Forums
discuss.pytorch.org › t › bce-loss-vs-cross-entropySep 25, 2020 · Hi all, I am wondering what loss to use for a specific application. I am trying to predict some binary image. For example, given some inputs a simple two layer neural net with ReLU activations after each layer outputs some 2x2 matrix [[0.01, 0.9], [0.1, 0.2]]. This prediction is compared to a ground truth 2x2 image like [[0, 1], [1, 1]] and the networks task is to get as close as possible. I ...