{"id":13736961,"url":"https://github.com/grasp-lyrl/modelzoo_continual","last_synced_at":"2025-05-08T13:32:12.793Z","repository":{"id":85569434,"uuid":"435085343","full_name":"grasp-lyrl/modelzoo_continual","owner":"grasp-lyrl","description":"Model Zoos for Continual Learning  (ICLR 22)","archived":false,"fork":false,"pushed_at":"2023-05-29T21:51:11.000Z","size":1051,"stargazers_count":36,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-01-28T23:11:52.578Z","etag":null,"topics":["continual-learning","deep-learning","iclr2022","learning-theory","lifelong-learning","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grasp-lyrl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-05T05:50:37.000Z","updated_at":"2024-04-23T13:33:22.883Z","dependencies_parsed_at":null,"dependency_job_id":"15dede4a-9445-4fcc-aabb-72a825e8e94b","html_url":"https://github.com/grasp-lyrl/modelzoo_continual","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasp-lyrl%2Fmodelzoo_continual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasp-lyrl%2Fmodelzoo_continual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasp-lyrl%2Fmodelzoo_continual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grasp-lyrl%2Fmodelzoo_continual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grasp-lyrl","download_url":"https://codeload.github.com/grasp-lyrl/modelzoo_continual/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224737431,"owners_count":17361345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continual-learning","deep-learning","iclr2022","learning-theory","lifelong-learning","pytorch"],"created_at":"2024-08-03T03:01:32.555Z","updated_at":"2025-05-08T13:32:12.780Z","avatar_url":"https://github.com/grasp-lyrl.png","language":"Python","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"# Model Zoo\n\nImplementation of [Model Zoo: A Growing \"Brain\" That Learns Continually](https://arxiv.org/abs/2106.03027) (ICLR 22). Jump into [this notebook](https://github.com/rahul13ramesh/modelzoo_continual/blob/main/modelzoo_minimal.ipynb) (which [Ashwin](https://laknath1996.github.io/) and I coded up) to get started on a simplified version of Model Zoo.\n\n\n\u003cp float=\"center\"\u003e\n  \u003cimg src=\"./assets/modelzoo.png\" height=\"300\" hspace=\"4\"/\u003e\n  \u003cimg src=\"./assets/fwd_bwd_transfer.png\" height=\"300\" hspace=\"4\"/\u003e\n\u003c/p\u003e\nModel Zoo tackles a sequence of tasks, and leverages past tasks to do well on new tasks, and new tasks to improve upon past tasks. Model Zoo explicitly splits the capacity of the model to mitigate task-competition and to exploit the relatedness of different tasks. It shows improvements as large as 10-25% when evaluated on different formulations of continual learning.  \n\n## Setup:\n\nTo install a working environment run:\n```\nconda env create -f env.yaml\n```\n\nDownload the `.pkl` files for Mini-imagenet \n([link](https://www.kaggle.com/whitemoon/miniimagenet)) and \ncopy the files to `./data/mini_imagenet/`\n\n\n## Usage\n\nThe file `modelzoo.py` is used to run the Zoo. The `-h`\nflag can be used to list the argparse arguments. For example to run Model Zoo:\n\n```bash\npython modelzoo.py --data_config ./config/dataset/coarse_cifar100.yaml \\\n                   --hp_config ./config/hyperparam/wrn.yaml \\\n                   --epochs 100 --replay_frac 1.0\n```\n\n\n## Directory Structure\n\n```bash\n├── modelzoo.py                   # Implementation of Model Zoo\n├── config:                       # Configuration files\n│   ├── dataset                    \n│   └── hyperparam                  \n├── datasets                      # Datasets and Dataloaders\n│   ├── build_dataset.py          \n│   ├── cifar.py                 \n│   ├── data.py                 \n│   ├── mini_imagenet.py           \n│   ├── mnist.py               \n│   ├── modmnist.py           \n├── net                           # Neural network architectures\n│   ├── build_net.py\n│   └── wideresnet.py\n│   └── smallconv.py\n└── utils                         # Utilities for logging/training\n    ├── config.py\n    ├── logger.py\n    └── run_net.py\n```\n\nIf you find this code useful, consider citing\n\n    @inproceedings{\n        ramesh2022model,\n        title={Model Zoo: A Growing Brain That Learns Continually},\n        author={Rahul Ramesh and Pratik Chaudhari},\n        booktitle={International Conference on Learning Representations},\n        year={2022},\n        url={https://openreview.net/forum?id=WfvgGBcgbE7}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrasp-lyrl%2Fmodelzoo_continual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrasp-lyrl%2Fmodelzoo_continual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrasp-lyrl%2Fmodelzoo_continual/lists"}