-
Notifications
You must be signed in to change notification settings - Fork 44
/
run_all.sh
executable file
·64 lines (55 loc) · 2.7 KB
/
run_all.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
#! /bin/bash
# This is a shell script automatically running 100 experiments on some dataset. The hyperparameters are those being used in the paper.
# Note that we chose to not use validation set to select the best net, but just let it run until reaching the maxEpoch and report the final test accuracy (by setting -valRatio 0). This is because graph datasets are usually too small for its validation split to be representative of its test split. We have tested that the validation splits are hardly useful here, thus giving them up.
# *author: Muhan Zhang, Washington University in St. Louis
data="${1}"
GPU=${2}
save="result"
fileName="${save}/${data}/testAcc"
common="-gpu ${GPU} -trainRatio 0.9 -valRatio 0"
rm ${save}/${data}/testAcc
rm ${save}/${data}/trainAcc
echo $common
echo ${fileName}
echo "A new run" >> $fileName
start=`date +%s`
for i in $(seq 1 10) # to run all random cv splits in one time
do
for j in $(seq 1 10)
do
echo "...............$i-$j..............."
case ${data} in
DD)
th main.lua -dataName DD -maxNodeLabel 89 -learningRate 1e-5 -fixed_shuffle "${i}_${j}" -maxEpoch 200 -save "${save}" $common -outputChannels '32 32 32 1'
;;
MUTAG)
th main.lua -maxNodeLabel 7 -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 300 -save "${save}" $common -outputChannels '32 32 32 1'
;;
ptc)
th main.lua -dataName ptc -maxNodeLabel 22 -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 200 -save "${save}" $common -outputChannels '32 32 32 1'
;;
NCI1)
th main.lua -dataName NCI1 -maxNodeLabel 37 -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 200 -save "${save}" $common -outputChannels '32 32 32 1'
;;
proteins)
th main.lua -dataName proteins -maxNodeLabel 3 -learningRate 1e-5 -fixed_shuffle "${i}_${j}" -maxEpoch 100 -save "${save}" $common -outputChannels '32 32 32 1'
;;
COLLAB)
th main.lua -dataName COLLAB -nClass 3 -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 300 -save "${save}" $common -outputChannels '32 32 32 1' -nodeLabel nDegree -k 0.9
;;
IMDBBINARY)
th main.lua -dataName IMDBBINARY -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 300 -save "${save}" $common -nodeLabel nDegree -k 0.9 -outputChannels '32 32 32 1'
;;
IMDBMULTI)
th main.lua -dataName IMDBMULTI -nClass 3 -learningRate 1e-4 -fixed_shuffle "${i}_${j}" -maxEpoch 500 -save "${save}" $common -outputChannels '32 32 32 1' -nodeLabel nDegree -k 0.9
;;
*) echo 'Dataset does not exist.'
;;
esac
done
done
stop=`date +%s`
echo "End of this run" >> $fileName
echo "The total running time is $[stop - start] seconds."
echo "The accuracy results for ${data} are as follows:"
cat ${fileName}