-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcogsci_final_experiment.sh
executable file
·56 lines (47 loc) · 1.18 KB
/
cogsci_final_experiment.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
exec &> "log_cogsci2019_final.txt"
sleep_sec=10
experiment_name='cogsci2019_final'
operand_digits=4
hidden_units=64
start_echo()
{
i=$1
operator=$2
echo "==================================================================="
echo "Run the $i-th training of ${operand_digits} digit ${operator}"
}
experiment()
{
device_num=$1
operator='add'
for i in {1..7..1}
do
python3 mlp_run.py $experiment_name $operand_digits $operator $hidden_units $device_num
done
operator='subtract'
for i in {1..7..1}
do
python3 mlp_run.py $experiment_name $operand_digits $operator $hidden_units $device_num
done
operator='divide'
for i in {1..7..1}
do
python3 mlp_run.py $experiment_name $operand_digits $operator $hidden_units $device_num
done
operator='modulo'
for i in {1..7..1}
do
python3 mlp_run.py $experiment_name $operand_digits $operator $hidden_units $device_num
done
operator='multiply'
for i in {1..7..1}
do
python3 mlp_run.py $experiment_name $operand_digits $operator $hidden_units $device_num
done
}
for j in {1..61..1}
do
device_num=$(( $j % 5 ))
experiment $device_num &
sleep $sleep_sec
done