python==3.10 pytorch==1.12.1 torchvision==0.13.1
git clone https://github.com/ain-soph/trojanzoo.git
cd trojanzoo
pip install -e .
nats_path
in ./configs/trojanvision/model.yml
The command to run the code is listed at the top of each file. For example, to run the genetic search for vulnerable architectures, use the following command:
CUDA_VISIBLE_DEVICES=1 python search_genetic.py --color --verbose 1 --model nats_bench --attack input_aware_dynamic --validate_interval 1 --train_mask_epochs 10 --epochs 10 --lr 1e-2 --natural --total_resume --save_suffix 1
--download
option may be necessary for the first run to download datasets and models.