If I have two unbalanced classes I’d like to this cost function since I can weight the error with reference to their class.
nn.BCEWithLogitsLoss(pos_weight=)
I’d like to know if the variable pos_weight is related only to class one or I can balance both classes. saying that I want to make for example class zero weighted by 0.6 and class One weighted by 0.4. or this only works for positive class ?
pos_weight = torch.FloatTensor([.6, .4])