A supplementary code for anonymous ICLR 2020 submission.
It trains a model so that it can later be edited: forced to predict a specific class on a specific input without losing accuracy.
- A machine with some CPU (preferably 2+ free cores) and GPU(s)
- Running without GPU is possible but does not scale well, especially for ImageNet
- Some popular Linux x64 distribution
- Tested on Ubuntu16.04, should work fine on any popular linux64 and even MacOS;
- Windows and x32 systems may require heavy wizardry to run;
- When in doubt, use Docker, preferably GPU-enabled (i.e. nvidia-docker)
- Clone or download this repo.
cd
yourself to it's root directory. - Grab or build a working python enviromnent. Anaconda works fine.
- Install packages from
requirements.txt
- Run jupyter notebook and open a notebook in
./notebooks/
- Before you run the first cell, change
%env CUDA_VISIBLE_DEVICES=#
to an index that you plan to use. - CIFAR10 notebook can be ran with no extra preparation
- The ImageNet notebooks require a step-by-step procedure to get running:
- Download the dataset first. See this page or just google it. No, really, go google it!
- Run
imagenet_preprocess_logits.ipynb
- Train with
imagenet_editable_training.ipynb
- Evaluate by using one of the two remaining notebooks.
- To reproduce machine translation experiments, follow the instructions in
./mt/README.md