Repo for project for Fairness, Accountability, Confidentialy and Transparency for master AI (Jan 2020), University of Amsterdam. This project focused on replicating the paper by Oscar et al. (2018). Their implementation can be found here.
- Tom Lotze
- Berend Jansen
- Stan Lochtenberg
- Cees Kaandorp
All files can be found in the folder “Reproduction”.
- Final_notebook: this file gives a demo of all the code necessary to train the models and reproduce the results we obtained. It also loads all the models that we trained and reports the accuracy and prototypes.
- train_mnist_cifar.py: python script to train the prototype model on CIFAR-10.
- train_mnist_cifar.sh: bash script to train prototype model on CIFAR-10 on Surfsara’s Lisa cluster.
- train_mnist_standard.py: python script to train the prototype model on standard MNIST.
- train_mnist_standard.sh: bash script to train prototype model on standard MNIST on Surfsara’s Lisa cluster.
- train_mnist_rgb2gray.py: python script to train the prototype model on gray MNIST.
- train_mnist_rgb2gray.sh: bash script to train prototype model on gray MNIST on Surfsara’s Lisa cluster.
- train_mnist_color.py: python script to train the prototype model on color MNIST.
- train_mnist_color.sh: bash script to train prototype model on color MNIST on Surfsara’s Lisa cluster.
All python scripts to train models will save the models in the “Reproduction/saved_model/” folder. Each model folder will contain the trained models, the train/valid/test loss/accuracy stored in pickle files, and the decoded prototypes.
To run the files, first create a conda environment from the “environment.yml” file. On Surfsara, run the following commands after creating the environment:
module load 2019
module load Anaconda3/2018.12
source activate fact
After activating the environment, use slurm to schedule your job. Example:
sbatch train_mnist_color.sh