X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dyncnn.git;a=blobdiff_plain;f=run.sh;h=3f8529d5714de4daa3e9884285adc0c3c3b6a154;hp=7ccfbb6a5af6afb3fb52e40717cf69bb1d05e2aa;hb=HEAD;hpb=39c30863654d44ce3d260f719b3b5b9e41dbd3c8 diff --git a/run.sh b/run.sh index 7ccfbb6..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 @@ -42,16 +44,24 @@ if [[ ! -d "${DYNCNN_DATA_DIR}" ]]; then --dir "${DYNCNN_DATA_DIR}" fi -# Train the model (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 + cat <