A continual learning approach that has the flexibility to learn a dedicated set of parameters, fine-tuned for every task, that doesn't require an increase in the number of trainable weights and is robust against catastrophic forgetting.
For details on this approach please read our paper. Experiments on continual learning with hypernetworks using sequential data and recurrent networks can be found in this repository.
Some toy regression problems can be explored in the folder toy_example. Please refer to the corresponding documentation. Example run:
$ python3 -m toy_example.train --no_cuda
You can find instructions on how to reproduce our MNIST experiments and on how to use the corresponding code in the subfolder mnist.
Please checkout the subfolder cifar. You may use the script cifar.train_zenke to run experiments using the same network as Zenke et al. and the script cifar.train_resnet to run experiments with a Resnet-32.
All testing of implemented functionality is located in the subfolder tests and documented here. To run all unit tests, execute:
$ python3 -m unittest discover -s tests/ -t .
Please refer to the README in the subfolder docs for instructions on how to compile and open the documentation.
We use conda to manage Python environments. To create an environment that already fulfills all package requirements of this repository, simply execute
$ conda env create -f environment.yml
$ conda activate hypercl_env
Please cite our paper if you use this code in your research project.
@inproceedings{oshg2019hypercl,
title={Continual learning with hypernetworks},
author={Johannes von Oswald and Christian Henning and Jo{\~a}o Sacramento and Benjamin F. Grewe},
booktitle={International Conference on Learning Representations},
year={2020},
url={https://arxiv.org/abs/1906.00695}
}