-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtrain.sh
executable file
·37 lines (34 loc) · 997 Bytes
/
train.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
#!/bin/bash
min_bins=$1
max_bins=$2
let subfloor=$min_bins-1
j=subfloor
while (( j++ < max_bins )); do
echo ""
echo "---------> Training with $j bins along each phase-space dimension <---------"
max_inner=1000
i=0
while (( i++ < max_inner )); do
if [ -f stop ]; then
echo ""
echo "---------> 'stop' file found -- removing 'stop' & exiting script <---------"
rm stop
exit 0
fi
echo ""
echo "---------> Run $i <---------"
./train-cloud-microphysics --base training --epochs 1000000 --bins $j --report 1000 --start 360 --stride 10 --tolerance "5.0E-08"
if [ -f converged ]; then
echo ""
echo "---------> 'converged' file found exiting inner loop <-------------"
break
fi
done
if [ -f converged ]; then
echo "---------> removing 'converged' file <-------------"
rm converged
else
echo ""
echo "---------> train.sh: training with $j bins did not converge within $max_inner inner-loop iterations <-------------"
fi
done