Skip to content
Snippets Groups Projects
Commit b1d42708 authored by Schneider Leo's avatar Schneider Leo
Browse files

fix : negative pair is always negative

parent 5710da19
No related branches found
No related tags found
No related merge requests found
......@@ -133,7 +133,9 @@ class ImageFolderDuo(data.Dataset):
if i < self.positive_prop:
label_ref = target
else :
label_ref = np.random.randint(0,len(self.classes)-1) #can be postive too (border effect)
l = np.arange(0,len(self.classes)-1,dtype=int).tolist()
l.remove(target)
label_ref = np.random.choice(l)
else :
label_ref = np.random.randint(0,len(self.classes)-1)
class_ref = self.classes[label_ref]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment