I have read a paper on Negative Learning: https://arxiv.org/abs/1908.07387. The idea is that you can train a network not only by telling what label of the sample is, but by telling what it surely is not. Let's call the latter a "negative" label.
An excerpt from the paper says (top formula is for usual "positive" label loss (PL), bottom - for "negative" label loss (NL):
I have a problem where "negative" labels collection is much easier than labeling each sample. So it is tempting to use it.
Is there some implementation of such a loss function in pytorch? Or should I write a custom loss layer code? If so, how should I do it?
nn.Module
class (see also this webpage). $\endgroup$