Readme!!! ---Make sure you install all packages in req.txt ---
A) Runs on ProxPulse:

	1) ProxPulse on AlexNet: on features_10:
CUDA_VISIBLE_DEVICES=0 python3 scripts/do_optimization_by_channel_circuit.py --nsteps 2 --batch_size 256 --save-interval 1001 --arch alexnet --imagenet "IMAGENET_FOLDER" --output alexnet/circuit_results features_10_unit_beta_0 --layer features_10 --channel a --alpha 0.1 --beta 0 --optim-all --vis-obj channel --maintain-obj softmax --do-final-image-search --attack-name ref_to_tops_art --attack-type ref_to_tops_art --ref_target_path target.JPEG --ref_target_path target1.JPEG --learning-rate 1e-4 --attack-obj channel --feat-vis-only
	2) Computing metrics:
python3 scripts/results_generator.py --results-directory  alexnet/circuit_results/features_10_unit_beta_0 --do-kt --do-clip --do-pdfs

B) Runs on CircuitBreaker
	1) Runs the attack on different circuit heads of AlexNet, features.10
	for unit in 2 150 20 40 70 120 240 17 190 121
	do 
		CUDA_VISIBLE_DEVICES=1 python3 scripts/do_optimization_by_channel_circuit.py --nsteps 5 --batch_size 256 --save-interval 1001 --arch alexnet --imagenet /scr/data/imagenet --output alexnet/circuit_results/R_circuit_$2_$unit --layer $2 --channel $unit --alpha 0.1 --beta 0.01 --optim-all --vis-obj channel --maintain-obj softmax --do-final-image-search --attack-name ref_to_tops_art --attack-type ref_to_tops_art --learning-rate 1e-4 --attack-obj channel --do-full-validation --save-image
	done;

	2) Runs to analyze circuits and compute metrics:
	for unit in 2 150 20 40 70 120 240 17 190 121
	do 
		CUDA_VISIBLE_DEVICES=1 python3 circuits/analyse_circuit.py --results-directory alexnet/circuit_results/R_circuit_features_10_$unit --pretrained --imagenet /home/shared_data/imagenet --arch alexnet --batch_size 32 --cuda --layer features.10 --unit $unit --sparsity 0.5 --K 5 --intermediate-artificial

	done;

Thank you for having reading me!

