发布于2019-11-17 16:52 阅读(1643) 评论(1) 点赞(30) 收藏(2)
win10
vs2015
cmake 3.16.0
cuda v8.0
cudnn v5.1
git
Anaconda3
python2.7
注意:所有命令行命令均在Anaconda3创建的环境下执行
可参考caffe官方文档
C:\Projects> git clone https://github.com/BVLC/caffe.git
C:\Projects> cd caffe
C:\Projects\caffe> git checkout windows 这步一定要,不然没有windows下的编译脚本
然后打开scripts文件夹下的build_win.cmd脚本,编辑以下内容
:: Default values
if DEFINED APPVEYOR (
echo Setting Appveyor defaults
if NOT DEFINED MSVC_VERSION set MSVC_VERSION=14 对应vs2015
if NOT DEFINED WITH_NINJA set WITH_NINJA=0 不使用NINJA编译(没用过)
if NOT DEFINED CPU_ONLY set CPU_ONLY=0 使用GPU,不使用改为1
if NOT DEFINED CUDA_ARCH_NAME set CUDA_ARCH_NAME=Auto 一般使用Auto即可,如果报错百度你显卡的架构填入
if NOT DEFINED CMAKE_CONFIG set CMAKE_CONFIG=Release
if NOT DEFINED USE_NCCL set USE_NCCL=0
if NOT DEFINED CMAKE_BUILD_SHARED_LIBS set CMAKE_BUILD_SHARED_LIBS=0
if NOT DEFINED PYTHON_VERSION set PYTHON_VERSION=2 python版本
if NOT DEFINED BUILD_PYTHON set BUILD_PYTHON=1 需要编译python接口
if NOT DEFINED BUILD_PYTHON_LAYER set BUILD_PYTHON_LAYER=1
if NOT DEFINED BUILD_MATLAB set BUILD_MATLAB=0
if NOT DEFINED PYTHON_EXE set PYTHON_EXE=python
if NOT DEFINED RUN_TESTS set RUN_TESTS=1
if NOT DEFINED RUN_LINT set RUN_LINT=1
if NOT DEFINED RUN_INSTALL set RUN_INSTALL=1
conda config --add channels conda-forge
conda config --add channels willyd
conda install --yes cmake ninja numpy scipy protobuf==3.1.0 six scikit-image pyyaml pydotplus graphviz
Pillow>=6.2.0
numpy>=1.8.1,<=1.14.0
scipy>=0.13.3,<=0.17.0
protobuf>=2.5.0,<=3.2.0
six>=1.5.2,<=1.10.0
requests>=2.20.0
gevent>=1.0,<=1.1.0
gevent-websocket>=0.10,<=0.10.1
Flask==1.1.1
Flask-WTF>=0.11,<=0.12
wtforms>=2.0,<=2.1
Flask-SocketIO==2.6
setuptools>=3.3,<=20.7.0
lmdb==0.87
h5py>=2.2.1,<=2.6.0
pydotplus
psutil>=1.2.1,<=3.4.2
matplotlib>=1.3.1,<=1.5.2
scikit-fmm>=0.0.9
python-magic>=0.2
boto>=2.48.0
import sys
reload(sys)
sys.setdefaultencoding('gbk')
12.finally,当当当当
有问题请留言
作者:gogogo
链接:https://www.pythonheidong.com/blog/article/158308/13c7338b1c17ffd97257/
来源:python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
---无人问津也好,技不如人也罢,你都要试着安静下来,去做自己该做的事,而不是让内心的烦躁、焦虑,坏掉你本来就不多的热情和定力
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!