Skip to content
Yuan Gao 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 need to install the dependency by following the Caffe's installation: http://caffe.berkeleyvision.org/installation.html, pay attention that CUDA SDK is also required because some *.cu files to be cleaned up are still in the project. And more information about Caffe can be found in the 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

We redirect all log files generated by caffe to a log subdir. Under the caffe directory, mkdir log. This will create the log dir for all the generated log files. To give an example, to check loss of the training, 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 deploy time

./build/tools/caffe time -model=models/bvlc_alexnet/deploy.prototxt -gpu 0 even though our code will print out timing info, but it is not accurate in this test case. you should check out log/caffe.INFO for the timing.

Clone this wiki locally