Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 1.15 KB

ADD_NEW_ALGORITHMS.md

File metadata and controls

12 lines (9 loc) · 1.15 KB

Adding New Continual Learning Algorithms

New Continual Learning algorithms can be added into CLiMB by adding Algorithm-specific modules in src/cl_algorithms. Algorithm specific initializations are made in src/train/train_upstream_continual_learning. However, certain algorithms may also need modifications to the model classes and/or TaskTrainer class.

For instance, in src/cl_algorithms/experience_replay.py, we defined a ExperienceReplayMemory class. An empty ReplayMemory is instantiated in src/train/train_upstream_continual_learning. When training on a new CL task, the replay memory is passed into the TaskTrainer.train() to do a periodic replay step. Finally, after learning each task, the replay memory is updated with a memory buffer for the new task.

On the model side, algorithms like freeze-bottom-k and freeze-encoder can be implemented by adding algorithm-specific methods directly to the model.