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

Implementation of the loss from Supervised Contrastive Loss paper. #1293

Merged
merged 15 commits into from
Sep 13, 2021

Conversation

Nimrais
Copy link
Contributor

@Nimrais Nimrais commented Sep 12, 2021

Before submitting (checklist)

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contribution guide?
  • Did you check the code style? catalyst-make-codestyle && catalyst-check-codestyle (pip install -U catalyst-codestyle).
  • Did you make sure to update the docs? We use Google format for all the methods and classes.
  • Did you check the docs with make check-docs?
  • Did you write any new necessary tests?
  • Did you check that your code passes the unit tests pytest . ?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG?
  • Did you run colab minimal CI/CD with latest and minimal requirements?
  • Did you check XLA integration with single and multiple processes?

Description

In the paper Supervised Contrastive Loss, the abstract contrastive criterion was proposed.
This PR carefully implements this criterion.

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

FAQ

Please review the FAQ before submitting an issue:

@pep8speaks
Copy link

pep8speaks commented Sep 13, 2021

Hello @Nimrais! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-09-13 07:44:25 UTC

Scitator
Scitator previously approved these changes Sep 13, 2021
Copy link
Member

@Scitator Scitator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
it also would be great to finally rename catalyst_contrastive to self_supervised ;)

examples/catalyst_contrastive/supervised_contrastive.py Outdated Show resolved Hide resolved
examples/catalyst_contrastive/supervised_contrastive.py Outdated Show resolved Hide resolved
@mergify mergify bot dismissed Scitator’s stale review September 13, 2021 05:28

Pull request has been modified.

Copy link
Member

@Scitator Scitator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last one comment

catalyst/contrib/nn/criterion/__init__.py Outdated Show resolved Hide resolved
@Scitator Scitator merged commit d455346 into catalyst-team:master Sep 13, 2021
@Nimrais Nimrais deleted the supervised-contrastive branch September 16, 2021 02:01
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

Successfully merging this pull request may close these issues.

3 participants