When selecting the negative triplet, right now, you are picking the sample furthest away from the anchor.
for i in range(self.triplet):
negative_feature = bottom[0].data[i+self.triplet2]
a_n = archor_feature - negative_feature
an = np.dot(a_n,a_n)
ans[i+self.triplet2] = an
ans = sorted(ans.items(), key = lambda d: d[1], reverse = True)
top_negative.append(bottom[0].data[ans[i][0]])
If we are mining the hardest negative sample, shouldn,'t we consider the closest negative sample to the anchor? Correct me if I'm wrong. Thanks!
Hello,
When selecting the negative triplet, right now, you are picking the sample furthest away from the anchor.
for i in range(self.triplet): negative_feature = bottom[0].data[i+self.triplet2] a_n = archor_feature - negative_feature an = np.dot(a_n,a_n) ans[i+self.triplet2] = an ans = sorted(ans.items(), key = lambda d: d[1], reverse = True)
top_negative.append(bottom[0].data[ans[i][0]])
If we are mining the hardest negative sample, shouldn,'t we consider the closest negative sample to the anchor? Correct me if I'm wrong. Thanks!