-
Notifications
You must be signed in to change notification settings - Fork 610
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
Implement triplet_semihard_loss #28
Implement triplet_semihard_loss #28
Conversation
30cede4
to
a0969c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you again. Triplet loss is a great thing to have included in our first package. I like the registering decorator as well... I'm fine with it living in //tensorflow_addons/util.py Also, I think we can decorate all the methods with @tf.function
without issue.
When time allows could you decorate the methods as a tf.function, and move the custom object register. Then should be ready to merge.
I'd like to create a new PR later to move the custom object register, what do you think? And I agree that we can decorate all the methods with |
No issue with a separate PR for moving the register.. it'll need to be applied to all our keras objects anyways. For the function decorator, I don't see a reason we should hold back just because it's not in tf.keras yet. We're building against tf2-nightly and adapting to TF2 best practices so I think we should include it. The base class implementing @tf.function on |
+1
Make sense, I agree with you. And I'll decorate the methods with tf.function in a few days (the day after tomorrow), as I need to attend a wedding tomorrow :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting a failing test TripletSemiHardLossTest.test_unweighted
due to this commit tensorflow/tensorflow@4604d1e
After that good to merge.
Fixed. Thank you :-) |
* ENH: Implement triplet_semihard_loss
* ENH: Implement triplet_semihard_loss
Related with: #26