Git Product home page Git Product logo

hebbianpca's Introduction

Pytorch implementation of Hebbian learning algorithms to train deep convolutional neural networks. A neural network model is trained on various datasets both using Hebbian algorithms and SGD in order to compare the results. Hybrid models with some layers trained by Hebbian learning and other layers trained by SGD are studied. A semi-supervised approach is also considered, where unsupervised Hebbian learning is used to pre-train internal layers of a DNN, followed by SGD fine-tuning of a final linear classifier. The approach performs better than simple end-to-end backprop training in scenarios with limited labeled samples availability.

This work, which focuses on Hebbian PCA algorithms, is a continuation of https://github.com/GabrieleLagani/HebbianLearningThesis
You might want to have a look also at the latest repo! https://github.com/GabrieleLagani/HebbianLearning

We also introduce a preliminary version of the neurolab package, a simple, extensible, Pytorch-based framework for deep learning experiments, providing functionalities for handling experimental configurations, reproducibility, checkpointing/resuming experiment state, hyperparameter search, and other utilities.

In order to launch an experiment session, type:
PYTHONPATH=<project root> python <project root>/runexp.py --config <dotter.path.to.config.object> --mode <mode> --device <device> --clearhist --restart
Where <dotter.path.to.config.object> is the path, in dotted notation, to a dictionary (which can be defined anywhere in the code) containing the configuration parameters that you want to use for your experiment; <mode> is either train or test; <device> is, for example, cpu or cuda:0; the --clearhist flag can be used if you don't need to keep old checkpoint files saved on disk; and the --restart flag can be used to restart an experiment from scratch, instead of resuming from a checkpoint.

You can also use: PYTHONPATH=<project root> python <project root>/runstack.py --stack <dotter.path.to.stack.object> --mode <mode> --device <device> --clearhist --restart
to run full stack of experiments (i.e. a list, which can be defined anywhere in the code).

Example: python runstack.py --stack stacks.vision.all[cifar10] --mode train --device cuda:0 --clearhist

Author: Gabriele Lagani - [email protected]

hebbianpca's People

Contributors

gabrielelagani 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.