This is the repository for our paper "Towards Defending Multiple
Create anaconda environment.
conda create -n gbn python=3.6
conda activate gbn
Install requirements.
pip install -r requirements.txt
Train an adversarial defensed LeNet5 model with GBN module, and test its accuracy under PGD
python train_gbn.py
Train a vanilla LeNet5 model without any adversarial attacks:
python train_lenet_vanilla.py
Train an adversarial defensed model using the average loss of
python train_lenet_AVG.py