X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dyncnn.git;a=blobdiff_plain;f=run.sh;h=3f8529d5714de4daa3e9884285adc0c3c3b6a154;hp=fe3a2e2342a65cdd57f7a728d5de266ab1d71b9a;hb=HEAD;hpb=5cbea5ca8a26719be70c974fab505e5b8695d9e4 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 <