-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain-co2
executable file
·41 lines (26 loc) · 1.07 KB
/
train-co2
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
#!/bin/sh
# Perform training of NN for CO2 close prediction
cd `dirname "$0"`
mkdir -p temp/db-aqua1
mkdir -p temp/db-aqua2
# TODO: Add menu or something...
AQUA1_PH_CLOSING_DB=temp/db-aqua1/ph-closing-state.db
AQUA2_PH_CLOSING_DB=temp/db-aqua2/ph-closing-state.db
if true; then
rm -f "$AQUA1_PH_CLOSING_DB"
rm -f "$AQUA2_PH_CLOSING_DB"
curl http://192.168.1.10:3000/db/ph-closing-state.db -o "$AQUA1_PH_CLOSING_DB" || exit 23
curl http://192.168.1.11:3000/db/ph-closing-state.db -o "$AQUA2_PH_CLOSING_DB" || exit 24
cd src/jsclient || exit 10
npm run build || exit 12
npm run dumpco2traindata || exit 55
cd ../../ || exit 9
fi
. ./source-me-to-activate-python-venv || exit 11
# Disable GPU because it's SLOW in our tiny network case (or small dataset)
export CUDA_VISIBLE_DEVICES=-1
python3 ./src/co2nn/trainco2.py || exit 5
tensorflowjs_converter --input_format=keras \
--output_format=tfjs_graph_model \
data/co2-model.h5 \
src/jsclient/server/static-ui/model.dump || exit 6