You could try to use nn.BCEWithLogitsLoss
, but note that the loss values might be unexpected, as described here.
Alternatively, nn.MSELoss
could work or have a look at label smoothing for NLLLoss.
You could try to use nn.BCEWithLogitsLoss
, but note that the loss values might be unexpected, as described here.
Alternatively, nn.MSELoss
could work or have a look at label smoothing for NLLLoss.