Hi,
I try to solve binary problem (2 labels) so I use nn.BCEWithLogitsLoss for my criterion. I tried to set weight of 500 for the positive labels (that`s also the minority class) by this way:
torch_weights = torch.ones([1]).cuda()
torch_weights = torch_weights*500
criterion = nn.BCEWithLogitsLoss(pos_weight=torch_weights )

Its has been compiled, but I think that its not the right way, because my loss function is on the same value, and if I change it to:
criterion = nn.BCEWithLogitsLoss(pos_weight=None)
I get much smaller value on the loss function
What I’m doing wrong? Thank you for your HELP!