Git Product home page Git Product logo

gmvandeven / brain-inspired-replay Goto Github PK

View Code? Open in Web Editor NEW
216.0 216.0 63.0 25.06 MB

A brain-inspired version of generative replay for continual learning with deep neural networks (e.g., class-incremental learning on CIFAR-100; PyTorch code).

License: MIT License

Python 99.36% Shell 0.64%
artificial-neural-networks brain-inspired continual-learning deep-learning distillation elastic-weight-consolidation generative-replay incremental-learning internal-replay lifelong-learning permuted-mnist replay replay-through-feedback split-cifar100 split-mnist synaptic-intelligence variational-autoencoder

brain-inspired-replay's People

Contributors

gmvandeven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

brain-inspired-replay's Issues

pre-trained model

Hi, I want to ask about the pre-trained models. The paper says you pre-train on cifar10, but the default pre-trained model, in the store/models/ file, C3-5×16-bn, seems a model of pre-training on cifar100. I have run main_pretrain.py on cifar10 to change the pre-trained model and it worked worse than the default. Did you use pre-trained model of cifar100 rather than cifar10 on paper's experiments?

Can't run cmopare_permMNIST100_bir.py

Hi,
When I ran compare_permMNIST100_bir.py, and set --seed=12 --n-seeds=5.
Then an error occureed,

File "/media/wuya/DATA/Code/continual_learning/brain-inspired-replay/options.py", line 350, in set_defaults
args.xdg_prop = 0. if args.scenario=="task" and args.xdg_prop is None else args.xdg_prop
AttributeError: 'Namespace' object has no attribute 'xdg_prop'

I don't know where to set xdg_prop, can you tell me how to do it?
Thank you very much!

Screenshot from 2021-02-03 00-23-12

result for 'scenario = class'

Hi, I am learning on your codes for a week and I have run several experiments so far. I have some questions.

  1. The setting of 'scenario='task'' works well, but the other one of 'scenario=class' is what I am confused with :
    For example, if I set a setting: 'expri..=splitMNIST, tasks=5, scenario=class ' , the result is "-task1: xx. xx -task2: xx. xx task3: xx. xx -task4: xx. xx -task5: xx. xx". I don't understand what it means as the result format is the same with 'scenario=task'. Does the classifier uses single-head or multi-head for class-IL ?

  2. In my experiments, EWC, SI, LwF had no effect on class-IL , all forgot. Is it normal?

Best regard

Regarding the "reinitialization of networks"

Hi, I refer to Fig 4 of the main paper, where it states "As a control, also shown is a variant of generative replay whereby the networks are reinitialized before each new task/episode". By reinitialization, does this mean that if we have that model after trained on task1, if we have to train on the next task, then we create a "brand new" model with the exact same architecture and retrain? If it is, then how different will it be from retraining from the current model? Is it likely that there will be no difference in performance with and without reinitialization for other cases because I tried on other types of dataset and the 2 curves kind of overlap rather than show one is better than the other?

How to reload model and predict?

Hi GMvandeVen, the model will be saved after run
./main_cl.py --experiment=splitMNIST --scenario=class --replay=generative --brain-inspired --pdf

is there any command to load trained model and use the model to predict?

Allowing an option to reproduce the code but on arbitrary datasets

Hi is it possible to allow an option for users to input their own dataset into the model rather than the default CIFAR10 and MNIST? If not, is there a minimal way that we can modify the scripts to accommodate our own datasets, especially inputs that are not image based , eg 1D arrays? Thanks!!!

Precision or Accuracy?

When I run the experiments, it displays as follows:

| Task: 3/5 | training loss: 0.407 | training precision: 0.992 |: 100%|███████████████████████████████████| 2000/2000 [08:37<00:00, 3.87it/s]

On-the-fly visdom plots also show precision as y-axis but the title of the plot is average accuracy.

Can you please clarify on that? I have seen same confusion in the code of your other repo: https://github.com/GMvandeVen/continual-learning

xdg_prop attribute

Perhaps related to 9afa20f, I get:

./compare_MNIST_hyperParams.py --scenario=task --seed=11                 #--> Fig. S1 (top)
Traceback (most recent call last):
  File "./compare_MNIST_hyperParams.py", line 62, in <module>
    args = handle_inputs()
  File "./compare_MNIST_hyperParams.py", line 37, in handle_inputs
    options.set_defaults(args, **kwargs)
  File "/home/fcyb/projects/brain-inspired-replay/options.py", line 350, in set_defaults
    args.xdg_prop = 0. if args.scenario=="task" and args.xdg_prop is None else args.xdg_prop
AttributeError: 'Namespace' object has no attribute 'xdg_prop'

Seems in hyper compare mode, xdg_prop is never defined?

if not compare_code in ('hyper'):
cl.add_argument('--xdg-prop', type=float, dest='xdg_prop', help="--> XdG: prop neurons per layer to gate")

command to run baselines

Hi, I am really amazed by the number of options that are being provided in the code to run the experiments. I was wondering how to run the baselines, that is, Joint Training and None [simple sequential learning], as mentioned in the article. What is the code and the parameters to run these baseline algorithms seperately, like we can run algorithms like GR, LWF, etc?

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.