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

FroSSL Implementation #390

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

FroSSL Implementation #390

wants to merge 5 commits into from

Conversation

OFSkean
Copy link

@OFSkean OFSkean commented Aug 4, 2024

Implementation of FroSSL from https://arxiv.org/pdf/2310.02903

I am currently training a ResNet-18 on ImageNet100 to make sure everything is working properly

@OFSkean OFSkean mentioned this pull request Aug 4, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.52%. Comparing base (b69b4bd) to head (92b28b5).

Files Patch % Lines
solo/losses/frossl.py 96.87% 1 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ *Carryforward flag
cpu 79.72% <98.70%> (+0.30%) ⬆️
dali 38.81% <ø> (ø) Carriedforward from b69b4bd

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
solo/losses/__init__.py 100.00% <100.00%> (ø)
solo/methods/__init__.py 100.00% <100.00%> (ø)
solo/methods/frossl.py 100.00% <100.00%> (ø)
solo/losses/frossl.py 96.87% <96.87%> (ø)

invariance_term = invariance_tradeoff * invariance_term

if logger is not None:
logger("frossl_regularization_loss", -regularization_term, sync_dist=True)
Copy link
Owner

Choose a reason for hiding this comment

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

Is this supposed to be logged as - regularization_term? I would also say that for consistency with the other loss functions, it's better if you return the individual elements and log them on the method's side. You could return the two terms and sum them in the method.

@vturrisi
Copy link
Owner

vturrisi commented Aug 8, 2024

@OFSkean Apart from my comment, the other parts look good. It's just missing the documentation for the method, results/checkpoints, and these to the README.

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.

2 participants