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 FromScratchTrainingPlugin #1288

Merged
merged 2 commits into from Jan 27, 2023
Merged

Conversation

HamedHemati
Copy link
Collaborator

This PR adds a new plugin called FromScratchTraining that resets the model's weights and optimizer state after each training experience. It is used as a baseline for comparison with sequential fine-tuning in some papers.

Minor: we can change the plugin's name if it's wordy. Another potential name could be: "StrategyResetter"

@coveralls
Copy link

coveralls commented Jan 26, 2023

Pull Request Test Coverage Report for Build 4024812550

  • 13 of 30 (43.33%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 73.671%

Changes Missing Coverage Covered Lines Changed/Added Lines %
avalanche/training/supervised/strategy_wrappers.py 3 8 37.5%
avalanche/training/plugins/from_scratch_training.py 9 21 42.86%
Totals Coverage Status
Change from base Build 3998183234: -0.05%
Covered Lines: 13800
Relevant Lines: 18732

💛 - Coveralls

from avalanche.models.dynamic_optimizers import reset_optimizer


class FromScratchTrainingPlugin(SupervisedPlugin):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's better to use the SGDTemplate here to support more use cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, will change it!

@AntonioCarta
Copy link
Collaborator

Should we have a supervised strategy too? Since we have them for the other baseline methods.

@HamedHemati
Copy link
Collaborator Author

Should we have a supervised strategy too? Since we have them for the other baseline methods.

Updates:

  • Updated the class definition
  • Added strategy wrapper
  • Added example

@AntonioCarta
Copy link
Collaborator

Thanks!

@AntonioCarta AntonioCarta merged commit cf392bc into ContinualAI:master Jan 27, 2023
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.

None yet

3 participants