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 | |
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')
-rw-r--r-- | examples/cifar10/readme.md | 6 | ||||
-rw-r--r-- | examples/mnist/readme.md | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/examples/cifar10/readme.md b/examples/cifar10/readme.md index 86fd5ea2..a329b49c 100644 --- a/examples/cifar10/readme.md +++ b/examples/cifar10/readme.md @@ -11,7 +11,7 @@ Alex's CIFAR-10 tutorial, Caffe style Alex Krizhevsky's [cuda-convnet](https://code.google.com/p/cuda-convnet/) details the model definitions, parameters, and training procedure for good performance on CIFAR-10. This example reproduces his results in 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`. We thank @chyojn for the pull request that defined the model schemas and solver configurations. @@ -32,12 +32,12 @@ If it complains that `wget` or `gunzip` are not installed, you need to install t The Model --------- -The CIFAR-10 model is a CNN that composes layers of convolution, pooling, rectified linear unit (ReLU) nonlinearities, and local contrast normalization with a linear classifier on top of it all. We have defined the model in the `CAFFE_ROOT/examples/cifar10` directory's `cifar10_quick_train.prototxt`. +The CIFAR-10 model is a CNN that composes layers of convolution, pooling, rectified linear unit (ReLU) nonlinearities, and local contrast normalization with a linear classifier on top of it all. We have defined the model in the `CAFFE_ROOT/examples/cifar10` directory's `cifar10_quick_train_test.prototxt`. Training and Testing the "Quick" Model -------------------------------------- -Training the model is simple after you have written the network definition protobuf and solver protobuf files. Simply run `train_quick.sh`, or the following command directly: +Training the model is simple after you have written the network definition protobuf and solver protobuf files (refer to [MNIST Tutorial](../examples/mnist.html)). Simply run `train_quick.sh`, or the following command directly: cd $CAFFE_ROOT/examples/cifar10 ./train_quick.sh 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 |