You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to run code on your own, I only provide codes on Caltech-256.
We do not upload the dataset and trainned networks due to the fact that they are storage consuming.
Training(Adversarial Training) scripts in this repo is not well writen, I suugest you to use your own scripts, or scripts provided in this repo
Caltech-256
The four most important python files for Caltech-256
They are all in /code/baseline/ :
main.py, attack.py, utils.pydataset.py
main.py trains CNNs. It contains sufficient comments to understand how to customize your trainings.
cd data and run Partition.py to generate training set and test set.
cd code/baseline and run main.py to train standard CNNs
cd code/pgd.inf.eps8 and run main.py to adversarially train CNNs against a $l_{\inf}$ -norm bounded PGD attacker. code in /code/Caltech256/code/pgd.l2.eps8 are for $l_2$ -norm bounded adversarial training .
gen_visual.py and utils.py in /code/Caltech256/code/baseline/ contains code to generate salience maps.
TinyImageNet & CIFAR-10
Code for TinyImageNet, and CIAFR-10 are similar to that for Caltech-256, important python files such as main.py, utils.py, attack.py has the same name and functionallities