similarity icon indicating copy to clipboard operation
similarity copied to clipboard

ArcFace Loss Implementation

Open aylinaydincs opened this issue 2 years ago • 2 comments

  • This pull_request is a part of Google Summer of Code Project mentored bt @monatis at TensorFlow Organization.
  • In this pull-request, I implement ArcFace Loss, and I also provide a sample notebook to show how to use it standalone and model.compile()
  • I wrote a introductory medium story and a more comprehensive and advanced one will be coming soon
  • I wrote unit tests for serializaiton and loss calculation

Ps. Previous Pull Request Deleted, due to the conflict of commits

aylinaydincs avatar Sep 21 '22 20:09 aylinaydincs

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Thanks for the PR. Looks like there are duplicate files again for the loss and the tests, and I think you'll need to run the Black and Isort formatting (the imports in the init.py look out of order again).

Also let me know your thoughts regarding adding the sub-centers layer. I think the weights that map the embedding to the N classes (and optionally the K sub-centers) needs to be a Dense layer so that we can train the weights. The current implementation has the matrix as a variable in loss so I don't think the random values will be updated during training.

owenvallis avatar Sep 22 '22 06:09 owenvallis