Teach you to build caffe and handwritten numeral recognition (full command prompt, pure small white tutorial)

Source: Internet
Author: User

teach you how to build caffe and handwritten numeral recognition



July Online Course teaching assistant team, Xiao Zhe, Cai, Li Wei, July
Date: November 9, 2016
Communication: Deep Learning Practical Exchange Q Group 472899334, there are problems can be added to this group of common communication. To explore the rationale behind the experiment, see this course: November in-depth workshops.



First, preface

In the previous tutorial, we built the TensorFlow, torch, after the release of the tutorial, we have a lot less problems. But another big frame caffe The problem is also a lot, plus Caffe is also the November depth of the three framework of the course to speak, therefore, we put Caffe build complete walk again, hands-on and full command prompt. This tutorial references GitHub:Https://github.com/BVLC/caffe, and the actual combat Caffe " P28 page Ubuntu environment preparation.

In addition, the author's installation environment is Ubuntu14.04,CUDA8.0,cudnn5.1,OpenCV,GTX1070. The construction of these can be see "Flappy Bird" and "tensorflow study van Gogh painting" Inside the installation tutorial.


Second, install the dependency

Update source

sudo apt-get update

Reference website address:http://caffe.berkeleyvision.org/install_apt.html

installation command:

sudo apt-get install Libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev Protobuf-compiler

sudo apt-get install--no-install-recommends Libboost-all-dev

Special tip:ubuntu command line hold ctrl+shift+c is copied,ctrl+shift+v is pasted

Third, related installation

To install the git command:

sudo apt-get install git

installation BLAS Command:

sudo apt-get install Libatlas-base-dev

the dependencies required to install the Pycaffe interface:

sudo apt-get install-y python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py Python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython Ipython

To install other dependent projects:

sudo apt-get install Libgflags-dev libgoogle-glog-dev Liblmdb-dev

Iv. Caffe related Operations

Download Caffe:

sudo git clone https://github.com/BVLC/caffe.git

Enter Caffe:

CD Caffe

Configuration Makefile.config file :

sudo cp Makefile.config.example Makefile.config

Modify Makefile.config:

sudo vi makefile.config

The author uses cudnn here , so the fourth line

# Use_cudnn: = 1 in front of # Delete to change

USE_CUDNN: = 1


compile Caffe:

Execute the following command sequentially

sudo make all-j16

sudo make test-j16

sudo make runtest-j16

FivecompilingPythonto use.Caffefile

compile Caffe:

Execute the following command

Make Pycaffe-j16

VI. Verification

CD python

Python

Import Caffe

No error will indicate that the installation was successful!




Seven, handwritten numeral recognition based on CaffeCaffe MNIST by Xiao Cai
official GitHub Address:
Https://github.com/BVLC/caffe
Cd/caffe/caffe
1. Download the data
./data/mnist/get_mnist.sh
2. Convert to Lmdb format
./examples/mnist/create_mnist.sh
3. Training Data
./examples/mnist/train_lenet.sh

also, for Caffe installation under Mac, please refer to: https://ask.julyedu.com/question/7468. July Online Teaching assistant team, November 9, 2016.

Teach you to build caffe and handwritten numeral recognition (full command prompt, pure small white tutorial)

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.