日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

caffe中Makefile.config详解

發(fā)布時(shí)間:2025/3/20 编程问答 14 豆豆
生活随笔 收集整理的這篇文章主要介紹了 caffe中Makefile.config详解 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

## Refer to http://caffe.berkeleyvision.org/installation.html?

# Contributions simplifying and improving our build system are welcome!?

?

?

# cuDNN acceleration switch (uncomment to build with cuDNN).?

# USE_CUDNN := 1?

"CuDNN是NVIDIA專門針對(duì)Deep Learning框架設(shè)計(jì)的一套GPU計(jì)算加速庫(kù),用于實(shí)現(xiàn)高性能的并行計(jì)算,在有GPU并且安裝CuDNN的情況下可以打開(kāi)即將注釋去掉。"?

?

?

# CPU-only switch (uncomment to build without GPU support).?

#CPU_ONLY := 1?

"表示是否用GPU,如果只有CPU這里要打開(kāi)"?

?

?

# uncomment to disable IO dependencies and corresponding data layers?

USE_OPENCV := 1?

"因?yàn)橐玫絆penCV庫(kù)所以要打開(kāi),下面這兩個(gè)選項(xiàng)表示是選擇Caffe的數(shù)據(jù)管理第三方庫(kù),兩者都不打開(kāi) Caffe默認(rèn)用的是LMDB,這兩者均是嵌入式數(shù)據(jù)庫(kù)管理系統(tǒng)編程庫(kù)。"?

# USE_LEVELDB := 0?

# USE_LMDB := 0?

?

?

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)?

#?? You should not set this flag if you will be reading LMDBs with any?

#?? possibility of simultaneous read and write?

# ALLOW_LMDB_NOLOCK := 1?

"當(dāng)需要讀取LMDB文件時(shí)可以取消注釋,默認(rèn)不打開(kāi)。"?

?

?

# Uncomment if you're using OpenCV 3?

OPENCV_VERSION := 2.4.10?

"用pkg-config --modversion opencv命令查看opencv版本"?

?

?

# To customize your choice of compiler, uncomment and set the following.?

# N.B. the default for Linux is g++ and the default for OSX is clang++?

# CUSTOM_CXX := g++?

"linux系統(tǒng)默認(rèn)使用g++編譯器,OSX則是clang++。"?

?

?

# CUDA directory contains bin/ and lib/ directories that we need.?

CUDA_DIR := /usr/local/cuda?

"CUDA的安裝目錄"?

# On Ubuntu 14.04, if cuda tools are installed via?

# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:?

# CUDA_DIR := /usr?

?

?

# CUDA architecture setting: going with all of them.?

# For CUDA < 6.0, comment the *_50 lines for compatibility.?

CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \?

??????? -gencode arch=compute_20,code=sm_21 \?

??????? -gencode arch=compute_30,code=sm_30 \?

??????? -gencode arch=compute_35,code=sm_35 \?

??????? -gencode arch=compute_50,code=sm_50 \?

??????? -gencode arch=compute_50,code=compute_50?

"這些參數(shù)需要根據(jù)GPU的計(jì)算能力來(lái)進(jìn)行設(shè)置,6.0以下的版本不支持×_50的計(jì)算能力。"?

?

?

# BLAS choice:?

# atlas for ATLAS (default)?

# mkl for MKL?

# open for OpenBlas?

BLAS := open?

"如果用的是ATLAS計(jì)算庫(kù)則賦值atlas,MKL計(jì)算庫(kù)則用mkl賦值,OpenBlas則賦值open。"?

?

?

# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.?

# Leave commented to accept the defaults for your choice of BLAS?

# (which should work)!?

BLAS_INCLUDE := /usr/local/OpenBlas/include?

BLAS_LIB := /usr/local/OpenBlas/lib?

"blas庫(kù)安裝目錄"?

?

?

# Homebrew puts openblas in a directory that is not on the standard search path?

# BLAS_INCLUDE := $(shell brew --prefix openblas)/include?

# BLAS_LIB := $(shell brew --prefix openblas)/lib?

"如果不是安裝在標(biāo)準(zhǔn)路徑則要指明"?

?

?

# This is required only if you will compile the matlab interface.?

# MATLAB directory should contain the mex binary in /bin.?

# MATLAB_DIR := /usr/local?

# MATLAB_DIR := /Applications/MATLAB_R2012b.app?

"matlab安裝庫(kù)的目錄"?

?

?

# NOTE: this is required only if you will compile the python interface.?

# We need to be able to find Python.h and numpy/arrayobject.h.?

PYTHON_INCLUDE := /usr/include/python2.7 \?

??????? /usr/lib/python2.7/dist-packages/numpy/core/include?

"python安裝目錄"?

# Anaconda Python distribution is quite popular. Include path:?

# Verify anaconda location, sometimes it's in root.?

# ANACONDA_HOME := $(HOME)/anaconda?

# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \?

??????? # $(ANACONDA_HOME)/include/python2.7 \?

??????? # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \?

?

?

# Uncomment to use Python 3 (default is Python 2)?

# PYTHON_LIBRARIES := boost_python3 python3.5m?

# PYTHON_INCLUDE := /usr/include/python3.5m \?

#???????????????? /usr/lib/python3.5/dist-packages/numpy/core/include?

?

?

# We need to be able to find libpythonX.X.so or .dylib.?

PYTHON_LIB := /usr/lib?

<font color="green">python庫(kù)位置</font>?

# PYTHON_LIB := $(ANACONDA_HOME)/lib?

?

?

# Homebrew installs numpy in a non standard path (keg only)?

# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include?

# PYTHON_LIB += $(shell brew --prefix numpy)/lib?

?

?

# Uncomment to support layers written in Python (will link against Python libs)?

WITH_PYTHON_LAYER := 1?

?

?

# Whatever else you find you need goes here.?

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include?

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib?

?

?

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies?

# INCLUDE_DIRS += $(shell brew --prefix)/include?

# LIBRARY_DIRS += $(shell brew --prefix)/lib?

?

?

# Uncomment to use `pkg-config` to specify OpenCV library paths.?

# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)?

# USE_PKG_CONFIG := 1?

?

?

# N.B. both build and distribute dirs are cleared on `make clean`?

BUILD_DIR := build?

DISTRIBUTE_DIR := distribute?

?

?

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171?

# DEBUG := 1?

?

?

# The ID of the GPU that 'make runtest' will use to run unit tests.?

TEST_GPUID := 0?

"所用的GPU的ID編號(hào)"?

?

?

# enable pretty build (comment to see full commands)?

Q ?= @

?

轉(zhuǎn)載于:https://www.cnblogs.com/jxhd1/p/8465089.html

總結(jié)

以上是生活随笔為你收集整理的caffe中Makefile.config详解的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。