Closed sayakpaul closed 4 years ago
Hi @sayakpaul ,
max_margin_contrastive_loss
is a wrapper for tfa.losses.contrastive_loss
. I just computed the pairwise Euclidean/cosine distance, retrieve the upper triangle, then feed it into tfa.losses.contrastive_loss
. Thanks for providing the additional details @wangz10.
I am referring to this implementation of the baseline architecture where you used wherein it seems like you have also normalized the features within the network which is where my doubt.
Regarding max_margin_contrastive_loss
, could you provide some details regarding your approach towards computing the contrastive pairs?
Hi @wangz10,
Thank you for putting together this repository and also the blog post. After going through the code, I had the following doubts. If you could help me clarify I would really appreciate it:
max_margin_contrastive_loss
function, it would be very helpful.Thank you and looking forward to hearing from you.