Load Caffe networks in Torch7 http://torch.ch
Install torch first. There is no Caffe dependency, only protobuf has to be installed. In Ubuntu do:
sudo apt-get install libprotobuf-dev protobuf-compiler
In OS X:
brew install protobuf
Then install the package itself:
luarocks install loadcaffe
Load a network:
require 'loadcaffe'
model = loadcaffe.load('deploy.prototxt', 'bvlc_alexnet.caffemodel', 'ccn2')Models from Caffe Model Zoo:
Loading googlenet is supported by https://github.com/soumith/inception.torch
NN support means both CPU and GPU backends.
You can also use Caffe inside Torch with this: https://github.com/szagoruyko/torch-caffe-binding However you can't use both loadcaffe and caffe in one torch session.
An example of using the package is in examples/mnist_lenet.lua. After running script to train lenet model in Caffe you can easily load and test it in Torch7 on CPU and GPU (with 'cuda' as a first arguments)
Rights to caffe.proto belong to the University of California.
