发布时间:2019-09-10 08:56:01编辑:auto阅读(2259)
首先需要安装caffe for python,安装过程可以参考:http://blog.csdn.net/u011961856/article/details/76557509
python 中调用caffe库函数为:
import caffe
如果不再caffe目录下运行汇报错:
import caffe
ImportError: No module named caffe
这是因为找不到caffe库,我们可以在代码中设置caffe路径,例如我的caffe安装目录为/home/program/caffe,则设置路径如下:
import sys
caffe_root='/home/program/caffe'
sys.path.insert(0, caffe_root + '/python')
import caffe
上一篇: Python二进制串转换为通用字符串
下一篇: python调用tcpdump抓包过滤
51346
50809
41402
38203
32693
29586
28417
23302
23258
21590
1667°
2400°
2007°
1943°
2275°
1973°
2678°
4480°
4307°
3071°