Sel-CL icon indicating copy to clipboard operation
Sel-CL copied to clipboard

Self-contrast set to -1

Open chenxi52 opened this issue 2 years ago • 0 comments

as mentioned in https://github.com/DiegoOrtego/LabelNoiseMOIT/issues/5 , there also exits an error in your code:

There may be a mistake that the elements of first dist.size()[0] at dim 1 are always set to -1, since the features are from a minibatch. The right way is:

dist = torch.mm(features, trainFeatures) # instead of features here
dist[torch.arange(dist.size()[0]), index] = -1  ##Self-contrast set to -1

chenxi52 avatar Jun 29 '22 14:06 chenxi52