zoukankan      html  css  js  c++  java
  • Caffe 编译

    Compilation

    Now that you have the prerequisites, edit your Makefile.config to change the paths for your setup The defaults should work, but uncomment the relevant lines if using Anaconda Python.

    cp Makefile.config.example Makefile.config
    # Adjust Makefile.config (for example, if using Anaconda Python)
    make all
    make test
    make runtest
    
    • For cuDNN acceleration, you should uncomment the USE_CUDNN := 1 switch in Makefile.config.
    • For CPU-only Caffe, uncomment CPU_ONLY := 1 in Makefile.config.

    To compile the Python and MATLAB wrappers do make pycaffe and make matcaffe respectively. Be sure to set your MATLAB and Python paths in Makefile.config first!

    Distribution: run make distribute to create a distribute directory with all the Caffe headers, compiled libraries, binaries, etc. needed for distribution to other machines.

    Speed: for a faster build, compile in parallel by doing make all -j8 where 8 is the number of parallel threads for compilation (a good choice for the number of threads is the number of cores in your machine).

    Now that you have installed Caffe, check out the MNIST tutorial and the reference ImageNet model tutorial.

    CMake Compilation

    In lieu of manually editing Makefile.config to configure the build, Caffe offers an unofficial CMake build thanks to @Nerei, @akosiorek, and other members of the community. It requires CMake version >= 2.8.7. The basic steps are as follows:

    mkdir build
    cd build
    cmake ..
    make all
    make runtest
    

    See PR #1667 for options and details.

    Hardware

    Laboratory Tested Hardware: Berkeley Vision runs Caffe with K40s, K20s, and Titans including models at ImageNet/ILSVRC scale. We also run on GTX series cards (980s and 770s) and GPU-equipped MacBook Pros. We have not encountered any trouble in-house with devices with CUDA capability >= 3.0. All reported hardware issues thus-far have been due to GPU configuration, overheating, and the like.

    CUDA compute capability: devices with compute capability <= 2.0 may have to reduce CUDA thread numbers and batch sizes due to hardware constraints. Your mileage may vary.

    Once installed, check your times against our reference performance numbers to make sure everything is configured properly.

    Ask hardware questions on the caffe-users group.

  • 相关阅读:
    mysql索引类型 normal, unique, full text
    16.信号量互斥编程
    15.信号通信编程
    14.有名管道通信
    13.无名管道通讯编程
    12.多进程程序的操作
    11.进程控制理论
    10.时间编程
    9. 库函数方式文件编程
    8.Linux文件编程
  • 原文地址:https://www.cnblogs.com/sdlypyzq/p/4839865.html
Copyright © 2011-2022 走看看