feat(ocl): add Learning Without Forgetting (LWF) strategy - #404
Open
tachyonicClock wants to merge 1 commit into
Open
feat(ocl): add Learning Without Forgetting (LWF) strategy#404tachyonicClock wants to merge 1 commit into
tachyonicClock wants to merge 1 commit into
Conversation
Learning Without Forgetting (LwF) is a regularisation-based continual learning strategy that distils predictions from a frozen teacher snapshot of the previous task while learning the current task (Li & Hoiem, 2016). Ported from the `blurry-ocl` draft branch and adapted to the current `capymoa.ocl` module layout. Also moves the model to `device` at construction (matching EWC and SI), since the draft version never did so and would otherwise error if `device` wasn't left as its `"cpu"` default, and renames `on_train_task` to `_on_train_task_begin` for naming consistency with the other event-handling strategies. Stacked on `feat/ocl-si` (#401), which this depends on for `capymoa.ocl.util._optim.reset_optimizer_state`. Assisted-by: claude-code:claude-sonnet-5
tachyonicClock
force-pushed
the
feat/ocl-lwf
branch
from
August 24, 2026 00:49
1d3b0b8 to
1e480a7
Compare
tachyonicClock
marked this pull request as ready for review
August 24, 2026 00:51
This was referenced Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat/ocl-si) — this PR only diffs the LWF-specific changes and depends oncapymoa.ocl.util._optim.reset_optimizer_state, added there.blurry-ocldraft branch, adapting it to the currentcapymoa.oclmodule layout (capymoa.ocl.events,capymoa.ocl.evaluation.events).hinton_distillation_lossto a newcapymoa.ocl.util.functionalmodule, LWF's only dependency for computing the distillation loss.LWFincapymoa.ocl.strategy.__init__.LWFcase totests/ocl/test_strategy.py.Closes: LwF
Assisted-by: claude-code:claude-sonnet-5