Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the difference between tf.contrib.losses.metric_learning.triplet_semihard_loss and batch_all_triplet_loss #57

Open
yuxiaokang-source opened this issue Jan 4, 2021 · 0 comments

Comments

@yuxiaokang-source
Copy link

I have test the function 'batch_all_triplet_loss'. It is equivalent to tfa.losses.triplet_hard_loss, But you mentioned
'There is an existing implementation of triplet loss with semi-hard online mining in TensorFlow: tf.contrib.losses.metric_learning.triplet_semihard_loss. Here we will not follow this implementation and start from scratch.'
what is the difference between tf.contrib.losses.metric_learning.triplet_semihard_loss and batch_all_triplet_loss ? If I just calculate the semi-hard triplet, I cant get the same result with tfa.losses.triplet_semihard_loss?Besides, why should I to optimize only the semi-hard triplet but not included the hard triplet in my loss function, I think the loss functiontfa.losses.triplet_semihard_loss is very strange.

@yuxiaokang-source yuxiaokang-source changed the title the difference between tf.contrib.losses.metric_learning.triplet_semihard_loss and batch_hard_triplet_loss the difference between tf.contrib.losses.metric_learning.triplet_semihard_loss and batch_all_triplet_loss Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant