stompsjo/RadClass

Changing supervised regularization term (alpha) from scalar to balanced weight

Opened this issue · 0 comments

It may be advantageous to change the current implementation of alpha from a scalar directly applied to the labeled contrastive loss term to a balanced weight that works on both versions. i.e. changing this line:

curr_loss['loss']['losses'][indices] *= self.alpha

To this:

curr_loss['loss']['losses'][indices] *= self.alpha 
curr_loss['loss']['losses'][~indices] *= (1-self.alpha)