参考http://www.cnblogs.com/denny402/p/5111018.html
一、环境 windows c++
将所有文件放在一个目录
“D:/caffe-windows/examples/_tempClassification”中
TOOLS=D:/caffe-windows/Build/x64/Release \
$TOOLS/classification.exe \
D:/caffe-windows/examples/_tempClassification/deploy.prototxt \
D:/caffe-windows/examples/_tempClassification/bvlc_reference_caffenet.caffemodel \
D:/caffe-windows/examples/_tempClassification/imagenet_mean.binaryproto \
D:/caffe-windows/examples/_tempClassification/synset_words.txt \
D:/caffe-windows/examples/_tempClassification/cat.jpg
但是结果:
并不是像博客中是cat的结果,为什么呢~
二、环境:windows python
根据博主提供的代码,提示No module named _caffe
查了一下环境路径,博主是
sys.path.insert(0, caffe_root + 'python')
解决方法:
安装的python是Anaconda2数据包,先将将python/caffe文件夹复制到C:/Program Files/Anaconda2/Lib/site-packages/目录下,然后再把环境配置为如下即可;
#sys.path.insert(0,'C:/Program Files/Anaconda2/Lib/site-packages/')