__2017-12-16 如一模式识别研究

如一模式识别研究

vc++>>happynear 的 windows编译caffe

github网址:https://github.com/happynear/caffe-windows/tree/master

Forked from https://www.github.com/BVLC/caffe (caffe源网址)master branch in 2015/11/09 . Next update time may be around 2016/01/01 .

I have made a list of some frequently asked questions in FAQ.md.(常用问答) If you get confused during configuring, please firstly look up for your question in the FAQ.md. This FAQ list is still under construction, I will keep adding questions into it.

Setup step:

  1. 下载第3方库。Download third-party libraries from BaiduYun Disk or OneDrive and extract the files to caffe-windows_root/3rdparty/.Please don't forget to add the ./3rdparty/bin folder to your environment variable PATH.

  2. 命令行运行,生成必要的头文件。Run ./src/caffe/proto/extract_proto.bat to create caffe.pb.hcaffe.pb.cc and caffe_pb2.py.

  3.  打开工程,没有GPU,就打开cpu_only版本。Double click ./buildVS2013/MainBuilder.sln to open the solution. If you do not have a Nvidia GPU, please open ./build_cpu_only/MainBuilder.sln.

  4. 编译。Change the compile mode to Release and X64.

  5. 更改cuda计算性能选项。Modify the cuda device compute capability defined in the settings (caffelib properties -> CUDA C/C++ -> Device ->Code Generation) to your GPU's compute capability (such as compute_30,sm_30; etc). You can look up for your GPU's compute capability in https://en.wikipedia.org/wiki/CUDA . Some general GPUs' compute capabilities are listed below.

    • 如果你gpu计算能力低于2.1,去掉USE_CUDNN选项。If your GPU's compute capability is below or equal to 2.1, please remove the USE_CUDNN macro in the proprocessor definition of all projects.
    • If you are using cpu only solution, just ignore this step.
  6. Compile.

GPU型号Compute Capability 计算能力
GTX660, 680, 760, 770compute_30,sm_30
GTX780, Titan Z, Titan Black, K20, K40compute_35,sm_35
GTX960, 980, Titan Xcompute_52,sm_52

中文安装说明:http://blog.csdn.net/happynear/article/details/45372231

Matlab Wrapper

更换包含文件目录和库目录就可针对各版本matlab进行编译。Just replace the Matlab include and library path defined in the settings and compile. Don't forget to add ./matlab to your Matlab path.

Python Wrapper

编译方法同matlab一样。Similar with Matlab, replace the python include and library path and compile.

python需要安装的支持库都放在了requirements.txt中,其中大部分用pip install就很容易能安装完成。Most of the libraries listed in ./python/requirements.txt can be installed by pip install. However, some of them cannot be installed so easily.

protobuf的安装方法:For protobuf, you may download the codes from https://github.com/google/protobuf. Copy caffe-windows-root/src/caffe/proto/protoc.exe to protobuf-root/src. Then run python setup.py install in protobuf-root/python.

leveldb,请按照https://github.com/happynear/py-leveldb-windows 

中的INREADME.md进行安装。For leveldb, I have created a repository https://github.com/happynear/py-leveldb-windows . Please follow the instructions inREADME.md to install it.

MNIST example

首先下载数据库,然后运行./run_mnist.bat。Please download the mnist leveldb database from http://pan.baidu.com/s/1mgl9ndu and extract it to ./examples/mnist. Then double click ./run_mnist.bat to run the MNIST demo.

Update log

2015/11/09 CuDNN v3 works well now.

2015/09/14 Multi-GPU is supported now.

WARNING: When you are using multiple gpus to train a model, please do not directly close the command window. Instead, please use Ctrl+C to avoid the gpu driver from crash.

You can also press Ctrl+Break to save a model snapshot whenever you want during training.

Acknowlegement

We greatly thank Yangqing Jia and BVLC group for developing Caffe,

@niuzhiheng for his contribution on the first generation of caffe-windows,

@ChenglongChen for his implementation of Batch Normalization,

@jackculpepper for his implementation of locally-connected layer,

and all people who have contributed to the caffe user group.

评论留言区

:
  

作者: 游客 ; *
评论内容: *
带*号为必填项目

如一模式识别更新提示

matlab在图像处理方面的应用有更新

如一模式识别 友情链接

关于本站作者     chinaw3c     mozilla