Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SENN

Self-Explaining Neural Networks

Dependencies

Major:

  • python (>3.0)
  • pytorch (=4.0)

Minor

  • numpy
  • matplotlib
  • nltk (needed only for text applications)
  • torchtext (needed only for text applications)
  • shapely
  • squarify

Installation

It's highly recommended that the following steps be done inside a virtual environment (e.g., via virtualenv or anaconda).

Install prereqs

First install pytorch.

Then install remaining dependencies

pip3 install -r requirements.txt

Finally, install this package

git clone [email protected]:dmelis/SENN.git
cd SENN
pip3 install ./
-->

How to use

To train models from scratch:

python scripts/main_mnist.py --train

To use pretrained models:

python scripts/main_mnist.py

Overall Code Structure

  • aggregators.py - defines the Aggregation functions
  • conceptizers.py - defines the functions that encode inputs into concepts (h(x))
  • parametrizers.oy - defines the functions that generate parameters from inputs (theta(x))
  • trainers.py - objectives, losses and training utilities

About

Self-Explaining Neural Networks

Resources

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages