LibContinual
LibContinual copied to clipboard
A Framework of Continual Learning
LibContinual
Make continual learning easy.
Introduction
LibContinual is an open source continual learning toolbox based on PyTorch. The master branch works with PyTorch 1.13. The compatibility to earlier versions of PyTorch is not fully tested.
Supported Methods
Conventional methods
- LwF (ECCV 2016)
- EWC (PNAS 2017)
- iCaRL (CVPR 2017)
- BiC (CVPR 2019)
- LUCIR (CVPR 2019)
- WA (CVPR 2020)
- DER (CVPR 2021)
- OCM (ICML 2022)
- ERACE,ERAML (ICLR 2022)
Foundation model based methods
Quick Installation
Please refer to install.md
Complete tutorials can be found at ./docs
Datasets
CIFAR-100 are available at Google Drive
After the dataset is downloaded, please extract the compressed file to the specified path.
unzip cifar100.zip -d /path/to/your/dataset
Set the data_root
in .yaml
:
data_root: /path/to/your/dataset
To add a custom dataset, please refer to dataset.md
.
Getting Started
Once you have completed the "Quick Installation" and "Datasets" sections, we can now proceed to demonstrate how to use the "LibContinual" framework with the LUCIR
method.
-
Step1: Set the path in
run_trainer.py
with./config/lucir.yaml
config = Config("./config/lucir.yaml").get_config_dict()
-
Step2: Configure the parameters in the
./config/lucir.yaml
file. Please refer toconfig.md
for the meanings of each parameter. -
Step3: Run code
python run_trainer.py
-
Step4: After the training is completed, the log files will be saved in the path specified by the
save_path
parameter.
Acknowledgement
LibContinual is an open source project designed to help continual learning researchers quickly understand the classic methods and code structures. We welcome other contributors to use this framework to implement their own or other impressive methods and add them to LibContinual. This library can only be used for academic research. We welcome any feedback during using LibContinual and will try our best to continually improve the library.
License
This project is licensed under the MIT License. See LICENSE for more details.