-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_tests.sh
30 lines (23 loc) · 1.03 KB
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
source .venv/bin/activate
methods=("DICTION") # values: ("DICTION", "DEEPSIGNS", "UCHIDA", "RES_ENCRYPT")
models=("MLP") # values: ("MLP" "CNN" "RESNET18" "MLP_RIGA")
operations=("SHOW") # values: ("TRAIN" "WATERMARKING" "PRUNING" "OVERWRITING" "FINE_TUNING" "SHOW" "PIA")
for method in "${methods[@]}"; do
for model in "${models[@]}"; do
for operation in "${operations[@]}"; do
echo -e "\nRunning $method with $model and $operation"
# Determine the output directory
if [ "$operation" == "TRAIN" ]; then
output_dir="outs/$operation"
else
output_dir="outs/$operation/$method"
fi
# Create the output directory if it does not exist
mkdir -p "$output_dir"
# Execute the python script and output the results to a file
python test_case.py --method "$method" --model "$model" --operation "$operation" | tee -a "$output_dir/$model.txt"
done
done
done
echo "Operations completed."