Robustness between the worst and average case
A repository that implements intermediate robustness training and evaluation from the NeurIPS 2021 paper Robustness between the worst and average case. Created by Leslie Rice, Anna Bair, Huan Zhang and Zico Kolter.
Installation and usage
- To install all required packages run:
pip install -r requirements.txt
. - Pretrained model weights can be downloaded here.
- To train (l_infty perturbations), run
python train.py -c {path_to_training_config_file}.json
. - To evaluate (l_infty perturbations), run
python train.py -c {path_to_evaluation_config_file}.json
. - To train (spatial transformations), run
python train_discrete.py -c {path_to_training_config_file}.json
. - To evaluate (spatial transformations), run
python eval_discrete.py --checkpoint {path_to_model_checkpoint}.pth
.