Hello Gopal!



 gokriznastic:

I want my model to not learn wherever the labels are “uncertain”. The reason for this being-  once the model is trained I hope to use it to replace the “uncertain” labels with “positive” or “negative”.
Correct me if I’m wrong but putting 0.5 would make my model biased towards examples where it can easily predict “positive” or “negative” otherwise.


My understanding of your situation is the following:
You have annotated training data.  You have samples that are
“positive” and are labeled “positive”, and similarly for “negative.”
You also have samples that are clearly “positive” or “negative”
but are labeled “uncertain” (for some reason).
If you have cases where the labels don’t match reality, I would
view those samples as not being (successfully) labeled, so I
would simply leave them out of my training data.  If you don’t
want to do that (Maybe, for a given sample, some of your
multilabel labels are correctly labeled, while a few are labeled
“uncertain.”), then you can pass (per-sample, per-multilabel-label)
weights to the “function” version of BCEWithLogitsLoss, namely
binary_cross_entropy_with_logits 32, and use 0 for the weights of
your “uncertain” instances.
Good luck.
K. Frank