Code Monkey home page Code Monkey logo

activation-pattern-analysis's Introduction

Studying the Evolution of Neural Activation Patterns during Training of Feed-Forward ReLU Networks

This repository is the code for the paper: Studying the Evolution of Neural Activation Patterns during Training of Feed-Forward ReLU Networks

Setup

  1. Make sure you have Pytorch (1.7.1) installed. (This code has been tested on Python 3.9.1).
  2. Install the requirements:
    pip install --user -r requirements.txt
    
  3. Make sure that visdom is running on your machine:
    mkdir logs
    visdom -env_path ./logs
    
    Go to http://localhost:8097

Experiments

In the following we give all steps required to reproduce the experiments shown in the figures of the paper.

Early-Phase Plots (Figure 1)

  1. Run ./exp.sh --gpu 0 -d run measures cifar10 early
  • You can observe the progress using ./exp.sh --stats measures cifar10 early
  • Multiple GPUs can be used in parallel, just start multiple processes using ./exp.sh --gpu 1 ...
  1. Extract data from log files using: ./paper_util/measures.sh
  2. Alternatively, obtain the data directly from visdom (go to http://localhost:8097)

Entropycurve-Plot (Figure 2)

  1. Run ./exp.sh --gpu 0 -d run entropycurve cifar10
  • You can observe the progress using ./exp.sh --stats entropycurve cf10
  • Multiple GPUs can be used in parallel, just start multiple processes using ./exp.sh --gpu 1 ...
  1. Extract data from log files using: ./plot.py entropycurve ./logs/entropycurve-*
  2. Alternatively, obtain the data directly from visdom (go to http://localhost:8097)

Full Training-Time Method Plots (Figure 3)

  1. Run ./exp.sh --gpu 0 -d run measures-methods cifar10 full save
  • This will precompute the network weights required for the last measure (Jaccard Index of the current training step and the final network state).
  • You can observe the progress using ./exp.sh --stats measures-methods cifar10 full save
  • Multiple GPUs can be used in parallel, just start multiple processes using ./exp.sh --gpu 1 ...
  1. Run ./exp.sh --gpu 0 -d run measures-methods cifar10 full actswithend
  • This will precompute the network weights required for the last measure (Jaccard Index of the current training step and the final network state).
  • You can observe the progress using ./exp.sh --stats measures-methods cifar10 full save
  • Multiple GPUs can be used in parallel, just start multiple processes using ./exp.sh --gpu 1 ...
  1. Extract data from log files using: ./paper_util/methods.sh
  2. Alternatively, obtain the data directly from visdom (go to http://localhost:8097)

activation-pattern-analysis's People

Contributors

da-h avatar

Stargazers

Tristan Kiersarsky avatar

Watchers

James Cloos avatar S. Brodehl 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.