luhaofang / tripletloss

tripletloss in caffe
MIT License
322 stars 152 forks source link

Use of the margin #56

Open gombru opened 6 years ago

gombru commented 6 years ago

Hello, I'm successfully using your tripletlosslayer.py to train a triplet net, but I have some doubts:

luhaofang commented 6 years ago

Hi, I think the margin is the hyper parameter to modify the positive triplet case, you may find that some triplet samples DON'T need to do backpropagation.

Please ignore the parameter self.a.

gombru commented 6 years ago

OK. So as I see in the code, the margin value is only used to omit from backpropagration those triplets fulfilling the margin, but has no influence in those triplets that are backpropagated, right?