-
Notifications
You must be signed in to change notification settings - Fork 193
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
[Triplet Margin Loss] Issue 1118 #1120
Open
cvnad1
wants to merge
57
commits into
google-deepmind:main
Choose a base branch
from
cvnad1:issue-1118
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
e9811d0
Triplet Marging Loss added
cvnad1 c19ceb3
Triplet Marging Loss added changes
cvnad1 c8f6937
Added Triplet Margin Loss tests
cvnad1 34a8610
added spaces
cvnad1 1778d05
indentation changes
cvnad1 5ab74eb
Reduced Indentation and line lengths
cvnad1 510d1c6
corrected apostrophe marks
cvnad1 f4f93c3
corrected test file conventions
cvnad1 52498f5
Triplet loss changes
cvnad1 ad40005
tests
cvnad1 ce16c2a
Added jit vmap compatibility
Saanidhyavats 85efeb8
Standardized the code
Saanidhyavats a15a2c7
Minor correction
Saanidhyavats fc3c32a
tests
cvnad1 b9f35a5
modified tests jit vmap
cvnad1 1d18f1c
whitespace cleared
cvnad1 b235710
changed dim to shape
cvnad1 f36416e
changed dim to shape
cvnad1 490d941
changed vmap and jit
cvnad1 7d1b43b
removed unused packages
cvnad1 6a3a9a1
tests modified args
cvnad1 80c95fb
testing loss function
cvnad1 7f877ef
testing loss function
cvnad1 77f6b33
testing loss function
cvnad1 6b92b6c
Made changes to pass all the tests
Saanidhyavats 7df60cb
Minor change
Saanidhyavats 31a0ece
trailing space
Saanidhyavats 894dfa2
refactored the code
cvnad1 6bf8aa5
Added triplet_margin_loss in api docs
Saanidhyavats 63a91f6
refactored the code
cvnad1 9df7799
Merge remote-tracking branch 'origin/issue-1118' into issue-1118
Saanidhyavats e586719
refactored the code
cvnad1 a7dd576
Merge branch 'issue-1118' of https://github.com/cvnad1/optax into iss…
cvnad1 cc8377d
Minor correction
Saanidhyavats afec78f
Minor correction
Saanidhyavats 4d8f50f
Minor correction
Saanidhyavats 3125b82
Trailing Spaces
Saanidhyavats 8706919
Trailing Spaces
Saanidhyavats 954d27e
Trailing Spaces at line 108
Saanidhyavats fa6e7a7
Removed jit
Saanidhyavats 35b3e50
Documentation
Saanidhyavats a56c0db
Testing
Saanidhyavats b46f945
Changed the function code and added test accordingly.
Saanidhyavats 12a1efa
Merge branch 'main' into issue-1118
Saanidhyavats d91ecc7
pylint correction
Saanidhyavats 61fa085
Merge remote-tracking branch 'origin/issue-1118' into issue-1118
Saanidhyavats ccd3ce5
pylint correction __init__.py
Saanidhyavats 2f9a138
Added assertion for float
Saanidhyavats b4ed379
place
cvnad1 75183f1
Merge branch 'issue-1118' of https://github.com/cvnad1/optax into iss…
cvnad1 6a5e2f2
function arguments
Saanidhyavats 8d78cf1
minor correction
Saanidhyavats 9a641cc
Merge branch 'google-deepmind:main' into issue-1118
Saanidhyavats ec34333
Merge branch 'issue-1118' of https://github.com/cvnad1/optax into iss…
cvnad1 af1bdb2
Added Docstring
cvnad1 4b4a36e
parameterized test
Saanidhyavats 4ddb7b8
Merge remote-tracking branch 'origin/issue-1118' into issue-1118
Saanidhyavats File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Avoid using numerical values as expected returns.
They may fail depending on the backend for example.
You may consider simple test cases with a "handmade" function (see e.g. the lbfgs tests). You can check for specific inputs (like zeros or ones).
You may also add a test for some specific behaviors (like using swap here).
Also you should test this function under jit/vmap etc... (see the chex.all_variant utility in some other tests).