This folder contains the PyTorch Codes for training the proposed method on the CIFAR-10 dataset and ResNet18 model. This code is adapted from the Github repository at "https://github.com/csdongxian/AWP".
The trained_model folder also contains the trained Network weights for a ResNet18 architecture.

> OAAT 
  -- train_OAAT.py (The main code to train OAAT on ResNet18 and CIFAR10)
  -- eval.py (Test the trained model on GAMA-PGD@8/255, GAMA-PGD@16/255 and Square@16/255.
  -- models/resnet.py (network architecture)

> AWP baseline can be trained using train_AWP.py

The hyperparamters we use for training OAAT: mixup coefficient = 0.2, maximum lpips coefficient = 1, epsilon = 16/255, beta=1.5(till vareps<12) later increased linearly to 3.
To train OAAT:
CUDA_VISIBLE_DEVICES=0  python train_OAAT.py --beta=1.5 --beta_final 3 --lpips_weight 1 --mixup_alpha 0.2 --epsilon=16/255 --epochs 110   > train_OAAT.txt

To evaluate OAAT/AWP:
CUDA_VISIBLE_DEVICES=0  python eval.py --main_model 'Pass the path of model file'

Further run.sh can be used to reproduce the OAAT CIFAR10 ResNet18 results