UNBUTU Installing and compiling MatConvNet
2016-07-08 15:30
393 查看
Download and unpack the library source code into a directory of your choice. Call the path to this directory
Compile the library.
At this point the library is ready to use. You can test it by using the command (using MATLAB R2014a or later):
the command line or an IDE can be used as well.unbuntu使用gcc编译器就可以了
Make sure that MATLAB is
configured to use your compiler.
Open MATLAB and issue the commands:
At this point MatConvNet should start compiling. If all goes well, you are ready to use the library. If not, you can try debugging the problem by running the compilation script again in verbose mode:
Increase the verbosity level to 2 to get even more information.
Remark: The 'vl_imreadjpeg' tool uses an external image library to load images. In Mac OS X and Windows, the default is to use the system libraries (Quartz and GDI+ respectively), so this dependency is immaterial. In Linux, this tool requires
the LibJPEG library and the corresponding development files to be installed in the system. If needed, the
You can also use the
is explained later.
Assuming that there is only a single copy of the CUDA toolkit installed in your system and that it matches MATLAB's version, compile the library with:
If you have multiple versions of the CUDA toolkit, or if the script cannot find the toolkit for any reason, specify the path to the CUDA toolkit explicitly. For example, on a Mac this may look like:
有时编译会出现找不到CUDA的情况,这时候也可以打开vl_compilenn.m文件去修改CUDA的路径到目前CUDA在系统中的安装路径
Once more, you can use the
last
Start MATLAB and type:
in order to add MatConvNet to MATLAB's search path.
Installing and compiling the library
In order to install the library, follows these steps:Download and unpack the library source code into a directory of your choice. Call the path to this directory
<MatConvNet>.
Compile the library.
At this point the library is ready to use. You can test it by using the command (using MATLAB R2014a or later):
Compiling
MatConvNet compiles under Linux, Mac, and Windows. This page discusses compiling MatConvNet using the MATLAB functionvl_compilenn. While this is the easiest method,
the command line or an IDE can be used as well.unbuntu使用gcc编译器就可以了
Compiling for CPU
If this is the first time you compile MatConvNet, consider trying first the CPU version. In order to do this, use thevl_compilenncommand supplied with the library:
Make sure that MATLAB is
configured to use your compiler.
Open MATLAB and issue the commands:
> cd <MatConvNet> > addpath matlab > vl_compilenn
At this point MatConvNet should start compiling. If all goes well, you are ready to use the library. If not, you can try debugging the problem by running the compilation script again in verbose mode:
> vl_compilenn('verbose', 1)
Increase the verbosity level to 2 to get even more information.
Remark: The 'vl_imreadjpeg' tool uses an external image library to load images. In Mac OS X and Windows, the default is to use the system libraries (Quartz and GDI+ respectively), so this dependency is immaterial. In Linux, this tool requires
the LibJPEG library and the corresponding development files to be installed in the system. If needed, the
ImageLibraryCompileFlagsand
ImageLibraryLinkFlagsoptions can be used to adjust the compiler and linker flags to match a specific library installation. It is also possible to use the
EnableImreadJpegoption of
vl_compilennto turn off this feature.
大部分情况下是需要使用GPU编译的,比如CVPR2016中MDNet(Multi-Domain Convolutional Neural Networks )的安装使用
Compiling the GPU support
To use the GPU-accelerated version of the library, you will need a NVIDA GPU card with compute capability 2.0 or greater and a copy of the NVIDIA CUDA toolkit. Ideally, the version of the CUDA toolkit should match your MATLAB version:MATLAB | CUDA toolkit |
---|---|
R2013b | 5.5 |
R2014a | 5.5 |
R2014b | 6.0 |
R2015a | 6.5 |
R2015b | 7.0 |
gpuDeviceMATLAB command to find out MATLAB's version of the CUDA toolkit. It is also possible (and often necessary) to use a more recent version of CUDA than the one officially supported by MATLAB; this
is explained later.
Assuming that there is only a single copy of the CUDA toolkit installed in your system and that it matches MATLAB's version, compile the library with:
> vl_compilenn('enableGpu', true)
If you have multiple versions of the CUDA toolkit, or if the script cannot find the toolkit for any reason, specify the path to the CUDA toolkit explicitly. For example, on a Mac this may look like:
有时编译会出现找不到CUDA的情况,这时候也可以打开vl_compilenn.m文件去修改CUDA的路径到目前CUDA在系统中的安装路径
> vl_compilenn('enableGpu', true, 'cudaRoot', '/Developer/NVIDIA/CUDA-7.0')
Once more, you can use the
verboseoption to obtain more information if needed.
last
Start MATLAB and type:
> run <MatConvNet>/matlab/vl_setupnn
in order to add MatConvNet to MATLAB's search path.
相关文章推荐
- cppconvnet is on line in gitHub
- 使用matlab版卷及神经网络 MatconvNe和预训练的imageNet进行图像检Image retrieval using MatconvNet and pre-trained imageNet
- Matlab图像识别/检索系列(11)—开源介绍之深度学习工具MatConvNet toolbox
- Caffe和MatConvNet安装
- 编译MatConvNet(仅CPU版本)
- Win 7下MatConvNet使用DAG网络方法记录
- 在win7的下对matconvnet进行配置(CPU)
- 深度学习之目标跟踪
- Undefined variable "dagnn" or class "dagnn.DagNN.loadobj"
- 细小人脸检测的实践(Finding Tiny Faces论文代码复现)
- cifar-10之matlab初步
- 编译twostreamfusion工程时遇到的问题
- MatConvNet 源码解析
- windows下编译Matconvnet的方法(CPU和GPU)
- DAGNN – 有向非循环图神经网络
- MDNet(multi domain CNN用于视觉跟踪)--源代码详解--mdnet_features_fcX.m
- 如何使用白菜价GPU运行基于MatConvNet的CNN程序
- MatConvNet对自己的图片分两类及提取图片特征
- win7+GPU+MATLAB+MatConvNet中遇到的问题解决
- Matconvnet 的安装以及使用