kam1107 / RealnessGAN

Code for ICLR2020 paper 'Real or Not Real, that is the Question'
Other
286 stars 39 forks source link

About the triplet loss(CategoricalLoss) #11

Closed avis-ma closed 4 years ago

avis-ma commented 4 years ago

First of all, thank you for your work, I am deeply attracted by your work. Thoughts that were understood when reading the paper, but doubts when reading the code. My understanding of the calculation process of triplet loss used to calculate loss is not thorough. I hope you can explain it when you have time. Thank you very much.

kam1107 commented 4 years ago

Hi, thanks for appreciating our work :)

The objective for D is to minimize V(G,D) by pulling real images towards the real anchor/A1 and fake images towards the fake anchor/A0, where the objective for G is to maximize V(G,D) bu pushing the generated images away from the fake anchor/A0.

This idea resembles that of triplet loss in a way where positive samples are pulled closer to the anchor and negative ones are pushed further away. It is kind of abuse of terminology since we are not strictly using the classic 'triplet loss'.