Caffe: Getting Started

To Use the Movidius neural network stick we have to use caffe.

http://caffe.berkeleyvision.org/install_osx.html

http://caffe.berkeleyvision.org/installation.html#compilation

Caffe is not super friendly or well documented in my opinion.

I’m having lots of installation problems on my mac.

Segmentation Fault 11

https://github.com/BVLC/caffe/issues/2677

Trying the last thing here. Be sure to change the version numbers in the path

I eventually got it to import with

PYTHON_INCLUDE := /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/

PYTHON_LIB := /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib

in MakeFile.config

I run the command with python2 which supposedly is the homebrew python.

python2 -m pip install protobuf scikit-image

 

Ok. Now we can start.

 

It is configuration file based. You make this protobuf file with the network and then load it up.

In standard configuration, you pull the data off of a database.

Data layers have the training data

top parameter is output of a layer

bottom is input

include Train Test are ways to include different guys at different stages

http://caffe.berkeleyvision.org/tutorial/loss.html

Any loss layer contributes to the eventual loss. You can weight them with a weighting parameter.  The solver runs to optimize loss layers by default. There is no parameter to specify which.

Some beginner files for syntax and exploration.

Sets input blobs in python (probably not the preferred methodology but it is fast to get up and running. Should probably at least dump into an hdf5)

Performs InnerProduct which is a matrix product and computes a euclidean loss.

Check out the mnist folder in caffe/examples. It has the clearest stuff.

 

 

 

 

 

This is the location of caffe.io

It has some routines for conversion to and from arrays and preprocessing in Transformer.

https://github.com/BVLC/caffe/blob/master/python/caffe/io.py

 

http://adilmoujahid.com/posts/2016/06/introduction-deep-learning-python-caffe/

 

http://christopher5106.github.io/deep/learning/2015/09/04/Deep-learning-tutorial-on-Caffe-Technology.html

 

View story at Medium.com

Deep Learning With Caffe In Python – Part I: Defining A Layer

https://github.com/BVLC/caffe/wiki

You can set certain layers to not train by setting learnign rate to 0

Leave a Reply

Your email address will not be published. Required fields are marked *