Hi, there:
I am training a multilabel annotation predictor, with 50 labels for each image.
In the first try, I just employ BCEWithLogitsLoss without any extra arguments:
criterion = nn.BCEWithLogitsLoss().cuda()

and it works fine. After this, I wanna feed some weight term for positive samples, just like the way described in the official docs, 7 with a torch.Tensor with the size of 50. But I received the following error:
TypeError: __init__() got an unexpected keyword argument 'pos_weight'

Could anyone give some advice? Thanks in advance!
I used a copy of pytorch 0.4.0, on a 64-bit linux machine.