3 # mlp-mnist is an implementation of a multi-layer neural network.
5 # Copyright (c) 2006 École Polytechnique Fédérale de Lausanne,
8 # Written by Francois Fleuret <francois@fleuret.org>
10 # This file is part of mlp-mnist.
12 # mlp-mnist is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License version 3 as
14 # published by the Free Software Foundation.
16 # mlp-mnist is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with mlp-mnist. If not, see <http://www.gnu.org/licenses/>.
28 if [[ $1 == "--download-mnist" ]]; then
29 for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do
30 if [[ ! -f "./$f" ]]; then
31 echo "Could not find $f, downloading it."
32 wget http://yann.lecun.com/exdb/mnist/$f.gz
38 echo "Unknown option $1"
44 for f in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte; do
45 if [[ -f "./$f" ]]; then
46 echo "Found $f, good."
48 echo "File $f is missing. Try $0 --download-mnist."
54 --nb-training-examples 20000 --nb-validation-examples 20000 \
55 --mlp-structure 784,200,10 \
56 --data-files ./train-images-idx3-ubyte ./train-labels-idx1-ubyte \
60 --load-mlp simple.mlp \
61 --data-files ./t10k-images-idx3-ubyte ./t10k-labels-idx1-ubyte \
62 --nb-test-examples 10000