#!/bin/bash

gpu_idx=7

# # # IBP training
# CUDA_VISIBLE_DEVICES=$gpu_idx python mix_train.py \
#        --dataset mnist --init default --use-pgd-training  \
#        --net cnn_3layer_small \
#        --lr 0.0005 --L2-reg 0 --lr-milestones 50 60 \
#        --train-eps 0.2 --test-eps 0.1  --train-steps 10 --test-steps 10  \
#        --train-batch 256 --test-batch 256  \
#        --robust-weight-start 1 --robust-weight-end 1 \
#        --start-epoch-robust-weight 0 --end-epoch-robust-weight 0 \
#        --grad-clip 10 \
#        --n-epochs 70 --start-epoch-eps 0 --end-epoch-eps 20 \
#        --save-dir ./SGD_models/


### GA from pretrain
# CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python evo_train.py --use-GA-evo \
#        --dataset mnist --init default --use-DP-training --load-model SGD_models/mnist/eps0.1/PGD_trained/cnn_3layer_small/init_default/model.ckpt --subbatch-size 100 \
#        --popsize 256 --std-init 1e-3 --std-min 1e-5 --num-actors 8 --num-elites 2 --num-parents 1 \
#        --start-epoch-std 10 --end-epoch-std 30 --start-epoch-psr 30 --end-epoch-psr 40 --psr-min 1e-3 \
#        --net cnn_3layer_small \
#        --lr 0.001 --L2-reg 0 --lr-milestones 80 \
#        --train-eps 0.1 --test-eps 0.1  --train-steps 0 --test-steps 0  \
#        --train-batch 256 --test-batch 50  \
#        --robust-weight-start 1 --robust-weight-end 1 \
#        --start-epoch-robust-weight 0 --end-epoch-robust-weight 0 \
#        --grad-clip 10 \
#        --n-epochs 50 --start-epoch-eps 0 --end-epoch-eps 0 \
#        --save-dir ./test_models/

### PGPE from pretrain
# CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python evo_train.py --use-PGPE-evo \
#        --dataset mnist --init default --use-DP-training --load-model SGD_models/mnist/eps0.1/PGD_trained/cnn_3layer_small/init_default/model.ckpt --subbatch-size 100 \
#        --popsize 256 --std-init 1e-3 --std-min 1e-5 --num-actors 8 \
#        --net cnn_3layer_small \
#        --lr 0.0005 --L2-reg 0 --lr-milestones 30 \
#        --train-eps 0.1 --test-eps 0.1  --train-steps 0 --test-steps 0  \
#        --train-batch 1024 --test-batch 50  \
#        --robust-weight-start 1 --robust-weight-end 1 \
#        --start-epoch-robust-weight 0 --end-epoch-robust-weight 0 \
#        --grad-clip 10 \
#        --n-epochs 50 --start-epoch-eps 0 --end-epoch-eps 0 \
#        --save-dir ./test_models/


### PGPE from scratch
# CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python evo_train.py --use-PGPE-evo \
#        --dataset mnist --init default --use-DP-training  --subbatch-size 100 \
#        --popsize 256 --std-init 1e-3 --std-min 1e-5 --num-actors 8 \
#        --net cnn_3layer_small \
#        --lr 0.001 --L2-reg 0 --lr-milestones 80 \
#        --train-eps 0.1 --test-eps 0.1  --train-steps 0 --test-steps 0  \
#        --train-batch 1024 --test-batch 1024  \
#        --robust-weight-start 1 --robust-weight-end 1 \
#        --start-epoch-robust-weight 0 --end-epoch-robust-weight 0 \
#        --grad-clip 10 \
#        --n-epochs 100 --start-epoch-eps 0 --end-epoch-eps 40 \
#        --save-dir ./test_models/


### GA from scratch
# CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python evo_train.py --use-GA-evo \
#        --dataset mnist --init default --use-DP-training --subbatch-size 100 \
#        --popsize 256 --std-init 1e-3 --std-min 1e-5 --num-actors 8 --num-elites 2 --num-parents 1 \
#        --start-epoch-std 50 --end-epoch-std 70 --start-epoch-psr 70 --end-epoch-psr 90 --psr-min 1e-3 \
#        --net cnn_3layer_small \
#        --lr 0.001 --L2-reg 0 --lr-milestones 80 \
#        --train-eps 0.1 --test-eps 0.1  --train-steps 0 --test-steps 0  \
#        --train-batch 1024 --test-batch 50  \
#        --robust-weight-start 1 --robust-weight-end 1 \
#        --start-epoch-robust-weight 0 --end-epoch-robust-weight 0 \
#        --grad-clip 10 \
#        --n-epochs 100 --start-epoch-eps 0 --end-epoch-eps 40 \
#        --save-dir ./test_models/