Code Monkey home page Code Monkey logo

imm_tensorflow's Introduction

Overcoming Catastrophic Forgetting by Incremental Moment Matching (IMM)

IMM incrementally matches the moment of the posterior distribution of neural networks, which is trained for the first and the second task respectively. The experiment is only for the shuffled MNIST task.

Reference

[1] Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha and Byoung-Tak Zhang. Overcoming Catastrophic Forgetting by Incremental Moment Matching. In Advances in Neural Information Processing Systems, 2017.

If you use this code as part of any published research, we'd really appreciate it if you could cite the following paper:

@inproceedings{Lee2017,
author = {Lee, Sang-Woo Lee and Kim, Jin-Hwa and Jun, Jaehyun and Ha, Jung-Woo and Zhang, Byoung-Tak},
booktitle = {Advances In Neural Information Processing Systems 30},
title = {{Overcoming Catastrophic Forgetting by Incremental Moment Matching (IMM)}},
year = {2017}
}

Environment

Tested at

  • Python v3.5
  • Tensorflow v1.4.0

Dataset

Shuffled MNIST data was used for the experiment with three sequential tasks. The first dataset is the same as the original MNIST dataset. In the second and third tasks, the input pixels of all images are shuffled with a fixed, random permutation.

no need to download mnist dataset. The download code is included.

Training

By default, main codes is executed with mean-imm and mode-imm. But, the main codes of SGD, L2-transfer, Drop-transfer or L2&drop-transfer are separated for its clear code.

Only SGD
$ python main.py
L2-Transfer
$ python main_l2.py
Drop-Transfer
$ python main_drop.py
L2 + Drop-Transfer
$ python main_l2_drop.py
with Mode IMM, Mean IMM and the other options
$ python main_l2_drop.py --dropout 0.5 --learning_rate 0.01 --alpha 0.5 --epoch 100
optional arguments:
--mean_imm                 # include Mean-IMM
--mode_imm                 # include Mode-IMM

--dropout [DROPOUT_RATE]   # dropout rate of hidden layers
--alpha [ALPHA]            # alpha(K) of Mean & Mode IMM (cf. equation (3)~(8) in the article)
--epoch [EPOCH]            # the number of training epoch
--optimizer [OPTIMIZER]    # the method name of optimization. (SGD, Adam or Momentum)
--learning_rate [RATE]     # learning rate of optimizer
--batch_size [BATCH_SIZE]  # mini batch size

imm_tensorflow's People

Contributors

btjhjeon avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar

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.