Hi,
I’m trying to implement a multi-label classification model starting from resnet18,
In my dataset I have 188 classes and each element can belong to one, two or three classes, I’m using one hot encoding.
So about 99% of attributes are zeros and my model predict only vectors with zeros and without 1.
Which metrics and loss functions can I use to measure my model correctly?
I’m trying to use
criterion = nn.BCEWithLogitsLoss(pos_weight = torch.ones([188]).to(device))
optimizer = optim.SGD(model.parameters(), lr=0.001)
Am I doing it right? ‘cause it seems doesn’t solve my problem.
Thank you for help