lopuhin / kaggle-imet-2019

91 stars 24 forks source link

Sigmoid before BCEWithLogitsLoss #3

Open Aaron4Fun opened 5 years ago

Aaron4Fun commented 5 years ago

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.

lopuhin commented 5 years ago

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