In order to run the code, please make sure the appropriate dataset folders are setup properly (check get_loaders in datasets.py)
Some aspects of this code were inherited from the following GitHub repos: https://github.com/hsndbk4/ARC, https://github.com/zdhNarsil/margin-boosting
The code requires the following packages to run:
python 3.6.9
PyTorch 1.7.0
numpy 1.19.2
torchvision 0.8.0


We provide five ResNet20s trained via BARRE on CIFAR-10, located in "res20_cifar10_M5"

## in order to re-produce the training outcome, please run:
CUDA_VISIBLE_DEVICES=0,1 python train_barre.py --M 5 --other_weight 1 --model res20 --batch_size 256 --outdir "res20_cifar10_M5" --normalize --osp_data_len 4096 --osp_batch_size 1024

## in order to evaluate the robustness of the trained models, please run:
CUDA_VISIBLE_DEVICES=0,1 python eval_robustness.py --M 5 --model res20 --batch_size 512 --sourcedir "res20_cifar10_M5" --outdir "res20_cifar10_M5" --normalize --use_osp
