diff options
author | Christos Nikolaou <christnn@auth.gr> | 2014-09-17 21:28:51 +0300 |
---|---|---|
committer | Christos Nikolaou <christnn@auth.gr> | 2014-09-17 21:36:06 +0300 |
commit | 3fc22b35b5fe1b08fb42dd631492270bd1ee4060 (patch) | |
tree | 3fc64b7acc93aee6d4764ae3cb6e5bd18792ae71 /examples/mnist | |
parent | a77ca760d20a583d9c797a61ea2a845247bbecd5 (diff) | |
download | caffeonacl-3fc22b35b5fe1b08fb42dd631492270bd1ee4060.tar.gz caffeonacl-3fc22b35b5fe1b08fb42dd631492270bd1ee4060.tar.bz2 caffeonacl-3fc22b35b5fe1b08fb42dd631492270bd1ee4060.zip |
Update readme.md files of cifar10 and mnist examples. Fixed broken links.
Diffstat (limited to 'examples/mnist')
-rw-r--r-- | examples/mnist/readme.md | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/examples/mnist/readme.md b/examples/mnist/readme.md index 5a8e8cab..2985240e 100644 --- a/examples/mnist/readme.md +++ b/examples/mnist/readme.md @@ -8,7 +8,7 @@ priority: 1 # Training MNIST with Caffe -We will assume that you have caffe successfully compiled. If not, please refer to the [Installation page](installation.html). In this tutorial, we will assume that your caffe installation is located at `CAFFE_ROOT`. +We will assume that you have caffe successfully compiled. If not, please refer to the [Installation page](/installation.html). In this tutorial, we will assume that your caffe installation is located at `CAFFE_ROOT`. ## Prepare Datasets @@ -29,7 +29,7 @@ The design of LeNet contains the essence of CNNs that are still used in larger m ## Define the MNIST Network -This section explains the prototxt file `lenet_train.prototxt` used in the MNIST demo. We assume that you are familiar with [Google Protobuf](https://developers.google.com/protocol-buffers/docs/overview), and assume that you have read the protobuf definitions used by Caffe, which can be found at `$CAFFE_ROOT/src/caffe/proto/caffe.proto`. +This section explains the prototxt file `lenet.prototxt` used in the MNIST demo. We assume that you are familiar with [Google Protobuf](https://developers.google.com/protocol-buffers/docs/overview), and assume that you have read the protobuf definitions used by Caffe, which can be found at `$CAFFE_ROOT/src/caffe/proto/caffe.proto`. Specifically, we will write a `caffe::NetParameter` (or in python, `caffe.proto.caffe_pb2.NetParameter`) protobuf. We will start by giving the network a name: @@ -203,9 +203,23 @@ Check out the comments explaining each line in the prototxt `$CAFFE_ROOT/example # solver mode: CPU or GPU solver_mode: GPU +## Additional Notes + +Note that the train and test protocol definition for the network is in the `lenet_train_test.prototxt` file which differs from the `lenet.prototxt` file. In `lenet_train_test.prototxt file`, layers may include one additional definition, like the one below: + + + layers { + + // Other layer definitions + + include: { phase: TRAIN } + } + +This layer will be used only in training phase. If we change `TRAIN` with `TEST`, then this layer will be used only in test phase. Otherwise this layer will be used in both training and test phase. Thus `lenet_train_test.prototxt` has two `DATA` layers defined (with different `batch_size`), one for training and one for testing. + ## Training and Testing the Model -Training the model is simple after you have written the network definition protobuf and solver protobuf files. Simply run `train_mnist.sh`, or the following command directly: +Training the model is simple after you have written the network definition protobuf and solver protobuf files. Simply run `train_lenet.sh`, or the following command directly: cd $CAFFE_ROOT/examples/mnist ./train_lenet.sh |