-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_SPs_target_shadow_training.sh
executable file
·71 lines (64 loc) · 1.51 KB
/
run_SPs_target_shadow_training.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# # shellcheck disable=SC2006
# py_path=`which python`
# start_epoch=$2
# dataset=$3
# run() {
# number=$1
# shift
# for i in $(seq $number); do
# # shellcheck disable=SC2068
# $@
# epoch=`expr $i \* $start_epoch`
# $py_path code/main_SPs_graph_classification.py --dataset $dataset --config 'configs/SPS/superpixels_graph_classification_GCN_'$dataset'_100k.json' --epochs $epoch
# done
# }
# # shellcheck disable=SC2046
# # shellcheck disable=SC2006
# #echo $epoch
# run "$1"
#!/bin/bash
# Default values
NUMBER=1
START_EPOCH=100
DATASET="CIFAR10"
# Parse command line arguments
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--number)
NUMBER="$2"
shift # past argument
shift # past value
;;
--start_epoch)
START_EPOCH="$2"
shift # past argument
shift # past value
;;
--dataset)
DATASET="$2"
shift # past argument
shift # past value
;;
*) # unknown option
echo "Unknown option: $1"
exit 1
;;
esac
done
# Print the parameters
echo "Number: $NUMBER"
echo "Start Epoch: $START_EPOCH"
echo "Dataset: $DATASET"
# Run the Python script with the provided arguments
python code/main_SPs_graph_classification.py \
--config '/home/kzhao11/mia_gnn/configs/SPS/superpixels_graph_classification_GatedGCN_CIFAR10_100k.json' \
--dataset "$DATASET" \
--gpu_id 0 \
--model GatedGCN \
--out_dir 'out/SPs_graph_classification/' \
--epochs $START_EPOCH \
--batch_size 32 \
--init_lr 0.001 \
# --num_workers 8