add factory header to caffe hpp
Merge pull request #1208 from Yangqing/dev

add factory header to caffe hpp