Skip to content
mauriciobreternitz edited this page Sep 10, 2015 · 22 revisions

Welcome to the OpenCL-caffe wiki!

#OpenCL caffe Wiki

Perquisite

##Caffe dependency The OpenCL caffe project is based on Berkeley's deep learning framework Caffe, so first you need to install the dependencies by following Caffe's installation instructions at : http://caffe.berkeleyvision.org/installation.html,

NOTE: The CUDA SDK is required because some *.cu files are still in the project (to be cleaned up)

More information about CAFFE can be found at the CAFFE homepage

Make instructions

Go to the root directory of OpenCL-Caffe (CAFFEROOT in the following)

mkdir build 
cd build
cmake .. 
make
make runtest

Log files

The log files generated by caffe are redirected to a log subdir. Under the caffe directory, issue mkdir log.

This will create the log dir for all the generated log files.

For exampleexample, to check training loss, issue grep -ni loss log/caffe.INFO

Data preparation

  • CIFAR data take cifar10 (http://www.cs.toronto.edu/~kriz/cifar.html) for example. cd data/cifar10, then run ./get_cifar10.sh. After the download is finished, cd examples/cifar10, run ./create_cifar10.sh;
  • ImageNet data

Model training

Under the directory CAFFEROOT/ choose the network you want to train, eg ./examples/imagenet/train_alexnet.sh

Benchmark deployment time

./build/tools/caffe time -model=models/bvlc_alexnet/deploy.prototxt -gpu 0

NOTe: Timing info it is not yet accurate in this test case.

See log/caffe.INFO for timing.

Clone this wiki locally