From: Francois Fleuret Date: Fri, 21 Oct 2016 05:53:14 +0000 (+0200) Subject: Added the loss graph plotting. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dyncnn.git;a=commitdiff_plain;h=1ac95d100c59265ae76df4fea676f016e1b19a50 Added the loss graph plotting. --- diff --git a/run.sh b/run.sh index d905ef9..c6f2690 100755 --- a/run.sh +++ b/run.sh @@ -30,6 +30,9 @@ set -o pipefail [[ "${DYNCNN_DATA_DIR}" ]] || DYNCNN_DATA_DIR="./data/10p-mg" [[ "${DYNCNN_RESULT_DIR}" ]] || DYNCNN_RESULT_DIR="./results" +###################################################################### +# Create the data-set if needed + if [[ -d "${DYNCNN_DATA_DIR}" ]]; then echo "Found ${DYNCNN_DATA_DIR}, checking the number of images in there." if [[ $(find "${DYNCNN_DATA_DIR}" -name "dyn_*.png" | wc -l) == 150000 ]]; then @@ -48,7 +51,8 @@ else --dir "${DYNCNN_DATA_DIR}" fi -# Train the model (takes days) +###################################################################### +# Train the model (~30h on a GTX1080) if [[ ! -f "${DYNCNN_RESULT_DIR}"/epoch_01000_model ]]; then ./dyncnn.lua --heavy --dataDir="${DYNCNN_DATA_DIR}" \ @@ -57,6 +61,7 @@ if [[ ! -f "${DYNCNN_RESULT_DIR}"/epoch_01000_model ]]; then --nbEpochs 1000 fi +###################################################################### # Create the images of internal activations for n in 2 12; do @@ -66,3 +71,29 @@ for n in 2 12; do --noLog \ --exampleInternals=${n} done + +###################################################################### +# Plot the loss curves if gnuplot is here + +if [[ $(which gnuplot) ]]; then + echo "Plotting losses.pdf." + + TERMINAL="pdfcairo color transparent enhanced font \"Times,14\"" + EXTENSION="pdf" + + gnuplot <