projects
/
dyncnn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d84867d
)
Minor update.
author
Francois Fleuret
<francois@fleuret.org>
Mon, 26 Dec 2016 10:19:34 +0000
(11:19 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 26 Dec 2016 10:19:34 +0000
(11:19 +0100)
run.sh
patch
|
blob
|
history
diff --git
a/run.sh
b/run.sh
index
fe3a2e2
..
3f8529d
100755
(executable)
--- a/
run.sh
+++ b/
run.sh
@@
-31,6
+31,8
@@
set -o pipefail
[[ "${DYNCNN_DATA_DIR}" ]] || DYNCNN_DATA_DIR="./data/10p-mg"
[[ "${DYNCNN_RUNDIR}" ]] || DYNCNN_RUNDIR="./results"
[[ "${DYNCNN_DATA_DIR}" ]] || DYNCNN_DATA_DIR="./data/10p-mg"
[[ "${DYNCNN_RUNDIR}" ]] || DYNCNN_RUNDIR="./results"
+NB_EPOCHS=2000
+
if [[ ! -d "${DYNCNN_DATA_DIR}" ]]; then
# Creating the data-base
make -j -k
if [[ ! -d "${DYNCNN_DATA_DIR}" ]]; then
# Creating the data-base
make -j -k
@@
-45,13
+47,21
@@
fi
# Train the model (2000 epochs takes 30h on a GTX 1080 with cuda 8.0,
# cudnn 5.1, and recent torch)
# Train the model (2000 epochs takes 30h on a GTX 1080 with cuda 8.0,
# cudnn 5.1, and recent torch)
-if [[ ! -f "${DYNCNN_RUNDIR}"/scheme_02000.t7 ]]; then
- ./dyncnn.lua -rundir "${DYNCNN_RUNDIR}"
+if [[ -f "$(printf "%s/model_%04d.t7" "${DYNCNN_RUNDIR}" ${NB_EPOCHS})" ]]; then
+ echo "Found the model already trained through ${NB_EPOCHS} epochs."
+else
+ ./dyncnn.lua -nbEpochs ${NB_EPOCHS} -rundir "${DYNCNN_RUNDIR}"
fi
# Create the images of internal activations using the current.t7 in
# the rundir
fi
# Create the images of internal activations using the current.t7 in
# the rundir
+ cat <<EOF
+***************************************************************************
+ Creates the images of internal activations
+***************************************************************************
+EOF
+
./dyncnn.lua -rundir "${DYNCNN_RUNDIR}" -noLog -exampleInternals 3,7
######################################################################
./dyncnn.lua -rundir "${DYNCNN_RUNDIR}" -noLog -exampleInternals 3,7
######################################################################
@@
-60,7
+70,7
@@
fi
if [[ $(which gnuplot) ]]; then
cat <<EOF
***************************************************************************
if [[ $(which gnuplot) ]]; then
cat <<EOF
***************************************************************************
-
Plot
the loss curves
+
Plots
the loss curves
***************************************************************************
EOF
***************************************************************************
EOF
@@
-75,8
+85,8
@@
set logscale y
set size ratio 0.75
set xlabel "Number of epochs"
set ylabel "Loss"
set size ratio 0.75
set xlabel "Number of epochs"
set ylabel "Loss"
-plot '< grep "
LOSS " "${DYNCNN_RUNDIR}"/log' using 4:6
with l lw 3 lc rgb '#c0c0ff' title 'Validation loss',\
- '< grep "
LOSS " "${DYNCNN_RUNDIR}"/log' using 4:5
with l lw 1 lc rgb '#000000' title 'Train loss'
+plot '< grep "
acc_train_loss" "${DYNCNN_RUNDIR}"/log' using 4:8
with l lw 3 lc rgb '#c0c0ff' title 'Validation loss',\
+ '< grep "
acc_train_loss" "${DYNCNN_RUNDIR}"/log' using 4:6
with l lw 1 lc rgb '#000000' title 'Train loss'
EOF
EOF