Introduction • Usage • Acknowledgments • Contact •
Created by Yan Yang from Nanjing University.
This project is built upon the PyCIL library developed by Da-Wei Zhou.
Link to the PyCIL library: PyCIL: A Python Toolbox for Class-Incremental Learning
DRT aims to reduce catastrophic forgetting caused by class imbalance in class-incremental learning by dynamically replaying the memory data.
A more detailed abstract can be found in the paper. This code implements our method. We use Python and Pytorch for the experiments.
The code has been tested on Linux (Linux version 3.10.0-1160.25.1.el7.x86_64)
- Edit the
exps/[MODEL NAME].json
file for global settings. - As for our method, you can run:
python main.py --config=./exps/drt.json
The code has implemented the pre-processing of CIFAR100
and imagenet100
. When training on CIFAR100
, this framework will automatically download it. When training on imagenet100
, you should specify the folder of your dataset in utils/data.py
.
def download_data(self):
assert 0,"You should specify the folder of your dataset"
train_dir = '[DATA-PATH]/train/'
test_dir = '[DATA-PATH]/val/'
We appreciate the open source code framework provided by the PyCIL project.
If there are any questions, please feel free to propose new features by opening an issue or contact with the author: Yan Yang (yangyan@smail.nju.edu.cn). Enjoy the code.