Code for NeurIPS'22 paper, "On the Tradeoff between Robustness and Fairness" by Xinsong Ma, Zekai Wang, Weiwei Liu.
- Python (3.8)
- Pytorch (1.9.0)
- numpy (1.21)
- tensorboard (2.7)
- CUDA (11.1)
CUDA_VISIBLE_DEVICES='0' python pgd_var.py --epsilon 0.015 --net resnet50 --dataset cifar100 --seed 1 --batch_size 256 --no_regular
CUDA_VISIBLE_DEVICES='0' python pgd_var.py --epsilon 0.015 --net resnet50 --dataset cifar100 --seed 1 --batch_size 256 --alpha 0.1
CUDA_VISIBLE_DEVICES='0' python trades_var.py --epsilon 0.062 --net resnet18 --beta 6.0 --dataset cifar10 --batch_size 256 --seed 1 --no_regular
CUDA_VISIBLE_DEVICES='0' python trades_var.py --epsilon 0.062 --net resnet18 --beta 6.0 --dataset cifar10 --batch_size 256 --seed 1 --alpha 0.1
CUDA_VISIBLE_DEVICES='0' python var_acc_test.py --attack_type fgsm --dataset 'cifar10' --dir_path './test_models'
CUDA_VISIBLE_DEVICES='0' python var_acc_test.py --attack_type pgd20 --dataset 'cifar10' --dir_path './test_models'
CUDA_VISIBLE_DEVICES='0' python var_acc_test.py --attack_type cw --dataset 'cifar10' --dir_path './test_models'
You can replace the device parameter 'CUDA_VISIBLE_DEVICES' and parameter '-- epsilon', '-- seed' if you need.