Hey there,
I’m trying to increase the weight of an under sampled class in a binary classification problem.
torch.nn.BCELoss has a weight attribute, however I don’t quite get it as this weight parameter is a constructor parameter and it is not updated depending on the batch of data being computed, therefore it doesn’t achieve what I need.
What is the correct way of simulating a class weight, similar to the way Keras does?
Cheers