X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=dyncnn.git;a=blobdiff_plain;f=run.sh;h=fe041f2f98c9c61d575c84aef7cee429c27cc561;hp=890c2e07009cef06c0742c5c2a3536e5a32e2627;hb=fe5dee151313b6abd8ffee2c5fc5593f326e663f;hpb=be0c7d53f21ce96c70e7c13ef0ba2c9eca10ca23 diff --git a/run.sh b/run.sh index 890c2e0..fe041f2 100755 --- a/run.sh +++ b/run.sh @@ -28,72 +28,79 @@ set -o pipefail [[ "${TORCH_NB_THREADS}" ]] || echo "You can set \$TORCH_NB_THREADS to the proper value (default 1)." [[ "${TORCH_USE_GPU}" ]] || echo "You can set \$TORCH_USE_GPU to 'yes' or 'no' (default 'no')." [[ "${DYNCNN_DATA_DIR}" ]] || DYNCNN_DATA_DIR="./data/10p-mg" -[[ "${DYNCNN_RESULT_DIR}" ]] || DYNCNN_RESULT_DIR="./results" + +[[ "${DYNCNN_RUNDIR}" ]] || DYNCNN_RUNDIR="./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 - echo "Looks good !" - else - echo "I do not find the proper number of images. Please remove the dir and re-run this scripts, or fix manually." - exit 1 - fi -else - # Creating the data-base +# Create the data-set if the directory does not exist + +if [[ ! -d "${DYNCNN_DATA_DIR}" ]]; then + cat <