How to run the code
1- The cb_run.py runst the iterations of the algorithm. Run it as follows:
python3 cb_run.py [class_name] [metric] [number_of_validation_images] [True if adversarial setting and False if real data]
Note that you can run cb_run.py scripts in parallell.
2- The cb_aggregate.py has to run alongside cb_run.py. This script constantly aggregates the parallel results and updates the set of filters that there needs to be more adaptive sampling. In other words, it runs the multi-armed-bandit section of the algorithm. Running only cb_run.py will not make use of the multi-armed-bandit speed-up.
Example bash script that runs NeuronShaley for the overall performance of the network:
python cb_aggregate.py all accuracy 25000 False
for i in $(seq 0 10)
do
    python3 cb_run.py all accuracy 25000 False
done

Requirement: 
1- You need to download the inception_v3 checkpoint and save it as inception_v3.ckpt: https://drive.google.com/open?id=1by_aFmyImtM-pVYq_BtPTvmCF3K9iyQe
2- Imagenet Validation set should be saved in './imagenet' structured as having images of each class in a separate folder (named exactly as the class names in the val_images.txt file). Images should be 299 * 299