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

Output mask for IncrementalClassifier and MultiHeadClassifier #1027

Merged
merged 7 commits into from May 19, 2022

Conversation

AntonioCarta
Copy link
Collaborator

I needed a couple of changes to the dynamic modules.

two changes:

  • DynamicModules adaptation now uses experience instead of dataset. This should make things faster and support other benchmarks (RL, ex-model, OCL) where we may not have a dataset.
  • output masking: some units of incremental/multihead classifiers are unused (e.g. if an experience contains classes 2 and 7, 8 units are created, 6 of which end up unused but trained anyway). Masking avoids training those units. Enabled by default but can be disabled.

@ContinualAI-bot
Copy link
Collaborator

Oh no! It seems there are some PEP8 errors! 😕
Don't worry, you can fix them! 💪
Here's a report about the errors and where you can find them:

tests/test_models.py:215:9: E306 expected 1 blank line before a nested definition, found 0
1       E306 expected 1 blank line before a nested definition, found 0

@coveralls
Copy link

coveralls commented May 19, 2022

Pull Request Test Coverage Report for Build 2353262781

  • 130 of 132 (98.48%) changed or added relevant lines in 10 files are covered.
  • 79 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.3%) to 70.251%

Changes Missing Coverage Covered Lines Changed/Added Lines %
avalanche/models/dynamic_modules.py 69 70 98.57%
avalanche/training/templates/online_supervised.py 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
avalanche/benchmarks/generators/benchmark_generators.py 1 91.81%
avalanche/training/templates/base.py 1 92.08%
avalanche/training/templates/base_sgd.py 1 94.94%
avalanche/training/plugins/lr_scheduling.py 13 83.33%
tests/training/test_plugins.py 63 82.34%
Totals Coverage Status
Change from base Build 2344910382: -0.3%
Covered Lines: 12048
Relevant Lines: 17150

💛 - Coveralls

@AntonioCarta AntonioCarta merged commit 1f06502 into ContinualAI:master May 19, 2022
@AntonioCarta AntonioCarta deleted the output_mask branch May 19, 2022 17:06
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