From c2ae78c4cfa3628c9695a08f60daeec09d9c2aad Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Mon, 26 Dec 2016 11:19:34 +0100 Subject: [PATCH] Minor update. --- run.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index fe3a2e2..3f8529d 100755 --- 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" +NB_EPOCHS=2000 + 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) -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 + cat <