kaggle-imet-2019 icon indicating copy to clipboard operation
kaggle-imet-2019 copied to clipboard

Sigmoid before BCEWithLogitsLoss

Open Aaron4Fun opened this issue 5 years ago • 1 comments

Is the sigmoid activation necessary before the output is fed into BCEWithLogitsLoss? Are there any reasons not using it in your code? Thanks in advance.

Aaron4Fun avatar Apr 19 '19 14:04 Aaron4Fun

This loss expects logits, so sigmoid must not be added here.

lopuhin avatar Apr 19 '19 17:04 lopuhin