Walleclipse / Deep_Speaker-speaker_recognition_system

Keras implementation of ‘’Deep Speaker: an End-to-End Neural Speaker Embedding System‘’ (speaker recognition)
246 stars 81 forks source link

triplet loss formula #9

Closed mangushev closed 5 years ago

mangushev commented 5 years ago

Hi, In triplet_loss, why it is loss = K.maximum(san - sap + alpha, 0.0) it got to be sap - san + alpha Am I missing something? Thanks!

Walleclipse commented 5 years ago

In general, our goal is to get higher anchor-positive similarity (sap) and lower anchor-negative similarity (san) . Thus loss function is opposite to object function, loss = K.maximum(san - sap + alpha, 0.0), that means, loss is high if I have higher san and lower sap. Check details in the part 3.3 of deep speaker paper

mangushev commented 5 years ago

Thanks, I was looking into euclidean similarity formula!