#!/bin/bash/
N=$1

#  1 10 50 100 500 1000 5000 10000
for seed in 1 2 3
    do
      for corruption_rate in 0.15 0.25 0.35 0.45
          do
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type blend --join_pretrain True --training_ratio 0.2&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type blend --join_pretrain True --training_ratio 0.2&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type blend --join_pretrain True&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type patch --join_pretrain False&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type blend --join_pretrain False&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
              python3 Solvers_BackDoor/PRL_InnerMax_Small.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'patch' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
              # wait only for first job
                wait -n
              fi
#              python3 Solvers_BackDoor/PRL_InnerMax_Small.py  --data_name 'cifar100' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
              python3 Solvers_BackDoor/PRL_InnerMax_Small.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
              # wait only for first job
                wait -n
              fi
#              python simclr.py --data_name cifar10 --seed $seed --corruption_rate $corruption_rate --corruption_type blend --join_pretrain False&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/PRL.py  --data_name 'mnist' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'pairflip' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/SPL.py  --data_name 'mnist' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'pairflip' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/PRL_innerMax.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/SPL_InnerMax.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/BootStrap.py  --data_name 'mnist' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'pairflip' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/Bootstrap_InnerMax.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/Standard.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/GaussianAug.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/InnerMax.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/DoubleRobustPRL.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/DoubleRobustSPL.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/DoubleRobustBootstrap.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/InnerPRL.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/InnerSPL.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
#              python3 Solvers_BackDoor/InnerBootstrap.py  --data_name 'cifar10' --batch_size 128 --seed $seed --corruption_rate $corruption_rate --max_epochs 100 --corruption_type 'blend' --eps_neighbor 0.05 --alpha 0.0 --drop_decay_step 0&
#              if [[ $(jobs -r -p | wc -l) -gt $N ]]; then
#              # wait only for first job
#                wait -n
#              fi
          done
    done

