How to Train the Lenet network using Caffe + MNIST on Ubuntu 14.04 64-bit Machine

Source: Internet
Author: User

How to Train the Lenet network using Caffe + MNIST on Ubuntu 14.04 64-bit Machine

How to Train the Lenet network using Caffe + MNIST on Ubuntu 14.04 64-bit Machine

1. Locate the terminal to the Caffe root directory;

2. Download and decompress the MNIST Database: $./data/mnist/get_mnist.sh

3. convert it to the Lmdb database format: $./examples/mnist/create_mnist.sh

After the shell script is executed, two new directories will be added under./examples/mnist, mnist_test_lmdb and mnist_train_lmdb.

4. train model: $./examples/mnist/train_lenet.sh

(1) Use the LeNet Network (Gradient-BasedLearning Applied to Document Recognition);

(2) Use./examples/mnist/lenet_train_test.prototxtmodel;

(3) Use./examples/mnist/lenet_solver.prototxtmodel;

(4) execute the train_lenet.sh script and call the caffe execution file under the./build/tools directory. The implementation of this execution file is the caffe. cpp file under the./tools directory;

(5) After the script is executed, several files are generated./examples/mnist/lenet_iter_assist.caffemodel is the model file generated during the final training;

(6) The above is run in GPU mode by default. To run it in CPU mode, you only need to change the solver_mode field value in the lenet_solver.prototxt file from the original GPU to the CPU;

The running result is as follows:

References: http://caffe.berkeleyvision.org/gathered/examples/mnist.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.