Giter VIP home page Giter VIP logo

dkp-gist's Introduction

Direct Kolen Pollack

This repository is an implementation of the Direct Kolen Pollack(DKP) method, as well as Direct Feedback Alignment(DFA), using PyTorch. DKP is a combination of two alternative credit assignment learning algorithms: DFA and the Kolen Pollack(KP) method as adapted by Akrout et al. The network used for testing each method on CIFAR10 consists of two convolutional layers followed by two fully connected layers. For testing on CIFAR100 we use AlexNet with batch normalization after each convolutional layer.

main.py usage example:

python main.py --train-mode DKP --batch-size 50 --epochs 100

alexnet/main.py usage example:

python main.py -a alexnet --dist-url 'tcp://127.0.0.1:8080' --dist-backend 'nccl' --multiprocessing-distributed --world-size 1 --rank 0 /home/user01/datasets/ILSVRC2012 --dataset cifar100 --train-mode DFA

Code for alexnet/main.py and alexnet/models/alexnet.py borrows heavily from the repositories below:

Direct Feedback Alignment vs Direct Kolen Pollack

Both DFA and DKP make use of direct connections from the output of the network to each layer in the backward path. This attribute allows for the parallelization of the backwards pass, also refered to as backwards unlocking, meaning that each layer's gradient can be calculated and updated in parallel with another.

In DFA, is a fixed random weight matrix that projects the gradient at the output of a network to the output of layer . Just as it is with backpropagation, the learning signal at the output of the network , where is the derivative of the activation function, would be calculated in the following way.


Then, the learning signal at some layer , as prescribed by DFA(and DKP), would be calculated in the following way.


As for DKP, the rules above remain the same, however is no longer a fixed matrix. We will adjust the backward matrices using the following update rule.

dkp-gist's People

Contributors

webstah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.