Giter VIP home page Giter VIP logo

continual-learning-reproduce's Introduction

Implementation of continual learning methods

This repository implements some continual / incremental / lifelong learning methods by PyTorch.

Especially the methods based on memory replay.

  • iCaRL: Incremental Classifier and Representation Learning. [paper]
  • End2End: End-to-End Incremental Learning. [paper]
  • DR: Lifelong Learning via Progressive Distillation and Retrospection. [paper]
  • UCIR: Learning a Unified Classifier Incrementally via Rebalancing. [paper]
  • BiC: Large Scale Incremental Learning. [paper]
  • LwM: Learning without Memorizing. [paper]
  • PODNet: PODNet: Pooled Outputs Distillation for Small-Tasks Incremental Learning. [paper]

Dependencies

  1. torch 1.7.1
  2. torchvision 0.8.2
  3. tqdm
  4. numpy
  5. scipy

Usage

Run experiment

  1. Edit the config.json file for global settings.
  2. Edit the hyperparameters in the corresponding .py file (e.g., models/icarl.py).
  3. Run:
python main.py

Add datasets

  1. Add corresponding classes to utils/data.py.
  2. Modify the _get_idata function in utils/data_manager.py.

Results

iCaRL

CIFAR100

Average accuracies of CIFAR-100 (iCaRL):

Increments Paper reported Reproduce
10 classes 64.1 63.10
20 classes 67.2 65.25
50 classes 68.6 67.69

UCIR

CIFAR100

ImageNet-Subset

BiC

ImageNet-1000

100 200 300 400 500 600 700 800 900 1000
Paper reported (BiC) 94.1 92.5 89.6 89.1 85.7 83.2 80.2 77.5 75.0 73.2
Reproduce 94.3 91.6 89.6 87.5 85.6 84.3 82.2 79.4 76.7 74.1

PODNet

CIFAR100

NME results are shown and the reproduced results are not in line with the reported results. Maybe I missed something...

Classifier Steps Reported (%) Reproduced (%)
Cosine (k=1) 50 56.69 55.49
LSC-CE (k=10) 50 59.86 55.69
LSC-NCA (k=10) 50 61.40 56.50
LSC-CE (k=10) 25 ----- 59.16
LSC-NCA (k=10) 25 62.71 59.79
LSC-CE (k=10) 10 ----- 62.59
LSC-NCA (k=10) 10 64.03 62.81
LSC-CE (k=10) 5 ----- 64.16
LSC-NCA (k=10) 5 64.48 64.37

Change log

  • (2020.6.8) Store the data with list instead of np.array to avoid bugs when the image size is different.
  • (2020.7.15) Avoid duplicative selection in constructing exemplars.
  • (2020.10.3) Fix the bug of excessive memory usage.
  • (2020.10.8) Store the data with np.array instead of Python list to obtain faster I/O.

Some problems

Q: Why can't I reproduce the results of the paper by this repository?

A: The result of the methods may be affected by the incremental order (In my opinion). You can either generate more orders and average their results or increase the number of training iterations (Adjust the hyperparameters).

References

https://github.com/arthurdouillard/incremental_learning.pytorch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.