GithubHelp home page GithubHelp logo

iabs-neuro / mango Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 0.0 315.85 MB

🥭 MANGO: Maximization of neural Activation via Non-Gradient Optimization

License: MIT License

Python 98.36% Shell 1.64%
activation-maximization gradient-free-optimization neural-representations spiking-neural-networks tensor-train neuroscience

mango's Introduction

🥭MANGO - Maximization of neural Activation via Non-Gradient Optimization

Description

Software product for analysis of activations and specialization in artificial neural networks (ANN), including spiking neural networks (SNN), with the tensor train (TT) decomposition and other gradient-free methods.

Installation

  1. Install python (version 3.8; you may use anaconda package manager);

  2. Create a virtual environment:

    conda create --name mango python=3.8 -y
  3. Activate the environment:

    conda activate mango
  4. install pytorch with specific cuda toolkit version

    conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
  5. (optional) install cupy for cudnn-based GPU acceleration for SNNs

    conda install -c conda-forge cupy cudnn cutensor
  6. Install dependencies:

    pip install jupyterlab "jax[cpu]" optax teneva ttopt protes snntorch spikingjelly matplotlib nevergrad requests urllib3

Usage

Run python manager.py ARGS, then see the outputs in the terminal and results in the result folder. Before starting the new calculation, you can completely delete or rename the result folder. A new result folder will be created automatically in this case.

To run the code on the cluster, we used the zhores_run.sh bash script (in this case, the console output will be saved in a file zhores_out.txt).

Supported combinations of the manager.py script arguments:

  • python manager.py --data cifar10 --task check --kind data

  • python manager.py --data imagenet --task check --kind data

  • python manager.py --data cifar10 --model densenet --task check --kind model --c 0

  • python manager.py --data imagenet --model vgg19 --task check --kind model --c 0

  • python manager.py --data cifar10 --gen vae_vq --model densenet --task train --kind gen

  • python manager.py --data cifar10 --gen vae_vq --model densenet --task check --kind gen

  • python manager.py --data cifar10 --gen gan_sn --model densenet --task check --kind gen

  • python manager.py --data cifar10 --gen vae_vq --model densenet --task am --kind class --c 0

    Classes may be 0, 1, ..., 9

  • python manager.py --data cifar10 --gen gan_sn --model densenet --task am --kind class --c 0

    Classes may be 0, 1, ..., 9

Authors

mango's People

Contributors

andreichertkov avatar bekemax avatar niveousdragon avatar viktorplusnin avatar

Stargazers

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