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

Add simCLR with temperature schedule #1413

Merged

Conversation

JannikWirtz
Copy link
Contributor

Hi,

this is my first PR to an open source project so I am starting it out as a draft.

I am looking to contribute to #1319. This PR should cover the first task. I will probably be able to do most of the tasks except for actually running the benchmark, since I don't think I have the neccessary hardware.

Thanks for reviewing :)

Copy link
Contributor

@guarin guarin left a comment

Choose a reason for hiding this comment

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

Thanks a lot of the PR!

Could you add a test_cosine_schedule__period method to the tests in tests/utils/test_scheduler.py to check that the new functionality works as expected?

lightly/utils/scheduler.py Outdated Show resolved Hide resolved
lightly/utils/scheduler.py Outdated Show resolved Hide resolved
lightly/utils/scheduler.py Outdated Show resolved Hide resolved
lightly/utils/scheduler.py Outdated Show resolved Hide resolved
@JannikWirtz
Copy link
Contributor Author

Thanks a lot for the feedback! I will take a look at the benchmark next.

@JannikWirtz JannikWirtz changed the title Add optional 'period' parameter to cosine_schedule Add simCLR with temperature schedule Oct 3, 2023
Copy link
Contributor

@guarin guarin left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the update! This looks pretty much good to merge. Left one small question.

lightly/utils/scheduler.py Outdated Show resolved Hide resolved
@guarin guarin marked this pull request as ready for review October 3, 2023 11:35
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (569bf2b) 85.37% compared to head (40c80d5) 85.37%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1413   +/-   ##
=======================================
  Coverage   85.37%   85.37%           
=======================================
  Files         130      130           
  Lines        5476     5484    +8     
=======================================
+ Hits         4675     4682    +7     
- Misses        801      802    +1     
Files Coverage Δ
lightly/utils/scheduler.py 97.14% <90.00%> (-2.86%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guarin guarin merged commit 5f1cd69 into lightly-ai:master Oct 3, 2023
@JannikWirtz JannikWirtz deleted the jannik_add_temperature_schedule_simclr branch October 4, 2023 09:37
@petroslk
Copy link

Hello there! I stumbled upon this and was wondering, has there been any docs added to document the use of the temperature scheduler with NTXentLoss for simCLR?
Thanks a lot for your work!

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