Hi,
I have a unbalanced dataset, so i tried to use pos_weight in BCEwithlogit loss:
torch.nn.BCEWithLogitsLoss(pos_weight=weights)(outputs,targets)
But I observed the loss is fluctuating very badly and results are also bad. shouldn’t they atleast be on par with the results i got without using class weights. Can anyone tell why this is happening and suggest another way for using class weights.