Installation and test __caffe of Caffe

Source: Internet
Author: User
Tags git clone

Recommendation system and hardware combination: Ubuntu14.04+cuda 7.5 1, installation Cuda

Install Caffe:git clone Https://github.com/BVLC/caffe

Install the Caffe Dependency pack: http://caffe.berkeleyvision.org/

->installation Instructions

->ubuntu Installation

->sudo apt-get Install Libprotobuf-dev Libleveldb-dev Libsnappy-devlibopencv-dev Protobuf-compiler

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

->sudo apt-get Install Libgflags-dev libgoogle-glog-dev liblmdb-dev 2, installing Python dependency packs

cython>=0.19.2

numpy>=1.7.1

scipy>=0.13.2

scikit-image>=0.9.3

matplotlib>=1.3.1

ipython>=3.0.0

h5py>=2.2.0

leveldb>=0.191

networkx>=1.8.1

nose>=1.3.0

pandas>=0.12.0

Python-dateutil>=1.4,<2

protobuf>=2.5.0

python-gflags>=2.0

pyyaml>=3.10

pillow>=2.3.0

six>=1.1.0

Cd caffeàless Python/requirements.txt

Sudo Apt-getinstall ... Each dependent package

Eg:sudo apt-getinstall Cython python-numpy python-scipy python-scikits-learn Python-matplotlibipython python-h5py Python-leveldb python-networkx python-nose python-pandaspython-dateutil python-protobuf python-gflags Python-six

Makefile configuration file Configuration

1, copy the Makefile configuration file under the Caffe folder MAKEFILE.CONFIG-EXAMPLE:CP Makefile.config-examplemakefile.config

>>vimmakefile.config the file for configuration changes

Use_leveldb

Use_lmdb These two are Caffe training knowledge, because Caffe training data needs to be read from the database, this database is done by LEVELDB and Lmdb.

>>make or make-j* (indicates that several threads are compiling Caffe, which is faster)

2, the ~/caffe/build folder with CMake for the compilation is entered >>cmake. (Failure modifies vim. /cmake/dependencies.cmake need RM CMakeCache.txt, then cmake again.

>>make or make-j* (indicates that several threads are compiling Caffe, which is faster) 3, testing

./build/examples/cpp_classification/classification.bin

Definition of Models/bvlc_reference_caffenet/deploy.prototxt//model network structure

Weights in the Models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel//network

Data/ilsvrc12/imagenet_mean.binaryproto//image preprocessing, image to mean (normalized)

Data/ilsvrc12/synset_words.txt//class name of each class

Examples/images/cat.jpg//Input image

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.