X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mlp.git;a=blobdiff_plain;f=doit.sh;fp=doit.sh;h=4b4d3242c730d618a6f12a470f575d2fe07ca0fe;hp=bd6f195e75aa1b710fca74a3a0b0e3944a8766c1;hb=a3e1c52fc152cbbbcc2c8c675f14efc0e653d6fd;hpb=713c683d77fc94a4257c4031b0c51ef4669a3d4a diff --git a/doit.sh b/doit.sh index bd6f195..4b4d324 100755 --- a/doit.sh +++ b/doit.sh @@ -2,8 +2,10 @@ # mlp-mnist is an implementation of a multi-layer neural network. # -# Copyright (c) 2008 Idiap Research Institute, http://www.idiap.ch/ -# Written by Francois Fleuret +# Copyright (c) 2006 École Polytechnique Fédérale de Lausanne, +# http://www.epfl.ch +# +# Written by Francois Fleuret # # This file is part of mlp-mnist. # @@ -21,14 +23,22 @@ make -k ann -if [[ $1 == "--download-mnist" ]]; then - for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do - if [[ ! -f "./$f" ]]; then - echo "Could not find $f, downloading it." - wget http://yann.lecun.com/exdb/mnist/$f.gz - gunzip $f.gz - fi - done +if [[ $1 ]]; then + + if [[ $1 == "--download-mnist" ]]; then + for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do + if [[ ! -f "./$f" ]]; then + echo "Could not find $f, downloading it." + wget http://yann.lecun.com/exdb/mnist/$f.gz + gunzip $f.gz + fi + done + else + + echo "Unknown option $1" + exit 1 + + fi fi for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do