Skip to content

dmelis/SENN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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 git@github.com: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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages