1. 安装准备

  • matlab2017a ,参考:《centos 安装matlab2017a(无root权限)》
  • GCC 4.8(支持c++11)      键入:sudo yum install gcc gcc-c++   (建议sudo装)
  • 至少CUDA 7.5,(本人选择cuda8.0)
  • CuDNN v4 (与cuda8对应,选择cudnn v5.0)
  • LibJPEG         键入:sudo yum install   libjpeg-turbo-devel (建议sudo装)
注意:直接使用以上命令安装Libjpeg可能会出现找不到"jpeglib.h"的错误,这时需要运行:

sudo yum -y install libjpeg*

这时可以检查如下目录,确认文件存在即可。

首先需要下载matconvenet,然后打开matlab进入到matconvnet-1.0-beta25/matlab
目录下,即vl_compilenn的目录下。

2.  开始安装

1). 先设置mex ,即:
 mex -setup mex -setup C++

结果:

>> mex -setup
MEX configured to use 'gcc' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLABvariables with more than 2^32-1 elements. You will be requiredto update your code to utilize the new API.You can find more information about this at:http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.To choose a different language, select one from the following:mex -setup C++ mex -setup FORTRAN
MEX configured to use 'g++' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLABvariables with more than 2^32-1 elements. You will be requiredto update your code to utilize the new API.You can find more information about this at:http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
>> 

2).设置gpu支持

   为了增加gpu加速,你需要NVIDIA GPU,且运算能力在2.0以上
你也可以使用 gpuDevice在matlab中查找合适的cuda版本
显然我的是cuda8.0. 
3).如果只装了一个cuda,且匹配matlab的版本,此时可以运行如下命令编译:
 vl_compilenn('enableGpu', true)

但如果装了好几个cuda,此时需要指定cuda的位置,即:

vl_compilenn('enableGpu', true, 'cudaRoot', '/Developer/NVIDIA/CUDA-8.0')
4).编译cuDNN支持
  • 一般编译:
> vl_compilenn
  • 使用CUDA编译:
vl_compilenn('enableGpu', true) 
  • 使用cudnn编译(路径名需要根据实际情况设置):
vl_compilenn('enableGpu', true, ...'cudaMethod', 'nvcc', ...'cudaRoot', '/usr/local/cuda/', ...'enableCudnn', true, ...'cudnnRoot', '/usr/local/cuda') 

注意:以上命令进入matlab中执行。需要先进入matlab目录下,然后执行vl_compilenn。

3. 测试

进入到xtest目录下,执行
vl_testnn

如果测试gpu支持的话,执行:

vl_testnn('gpu', true)

运行结束,会有一个总结,如果没有错误实例,则表明安装成功。

补充说明:

如果要在matlab指定使用gpu的话,可以提前使用gpuDevice ,参考:https://cn.mathworks.com/help/distcomp/gpudevice.html

4. 参考文献

  1. MatConvNet在Ubuntu14.04上的配置笔记
  2. jpeglib.h: No such file or directory - CentOS 7
  3. windows下编译Matconvnet的方法(CPU和GPU)
  4. gpuDevice设置
  5. Matconvnet官网

centos 安装 MatConvNet (gpu)相关推荐

  1. centos安装anaconda_每天三分钟之TensorFlow学习03:Win下安装TF2

    今天我们聊聊如何在windows操作系统环境下,安装TensorFlow2.X版本.今天的话题分为三个部分: (1)硬件环境配置: (2)软件选择: (3)安装及问题处理. (1)硬件环境配置 通常, ...

  2. sge安装 centos 安装 gridengine

    centos 安装 gridengine  详细操作步骤 Installation of Son of Grid Engine(SGE) on CentOS 6.7 mgt# hostnamectl ...

  3. Ubuntu和Centos安装Tensorflow教程PyTorch

    更多请关注: https://github.com/chanhal https://www.zhihu.com/people/chanhal https://github.com/chanhal/co ...

  4. linux安装p100驱动,CentOS安装Nvidia驱动和CUDA ToolKit

    配置有GPU的云服务器或物理机需要安装正确的驱动软件才能够使用,以NVIDIA Tesla GPU为例,需要安装Tesla显卡驱动作为硬件驱动程序,还需要安装CUDA作为上层应用程序所需要的库. 本文 ...

  5. linux基础-vmware与Centos安装

    安装方式 想学Linux,如何安装才是正确的方式呢. pc可以选择 -纯系统 Linux或者windows -双系统 Windows+Linux -虚拟化技术 Windows+vmware works ...

  6. CentOS 安装docker.ce报错提示containerd.io >= 1.2.2-3问题

    centos安装docker.ce遇到报错,提示如下 # yum install -y docker-ce Last metadata expiration check: 0:01:49 ago on ...

  7. CentOS安装crontab

    CentOS安装crontab: yum install crontabs 说明: service crond start //启动服务 service crond stop //关闭服务 servi ...

  8. CentOS 安装Apache

    # centOS 安装A M P 环境 [参考简书作者,非常感谢!!!](https://www.jianshu.com/p/bc14ff0ab1c7) ## 一 Apache 环境安装 1 安装Ap ...

  9. centos 安装 NTFS支持

    2019独角兽企业重金招聘Python工程师标准>>> 参考的原文网址: centos安装完之后,默认是不支持NTFS磁盘格式的,解决的方法之一就是安装NTFS-3G模块,但是默认的 ...

最新文章

  1. C基础知识小总结(十)
  2. ROS创建工作空间与节点
  3. 谈判如何在博弈中获得更多_读后感--《谈判--如何在博弈中获得更多》
  4. linux系列(十六):which命令
  5. 万字长文,带你彻底理解EF Core 5的运行机制,让你成为团队中的EF Core专家
  6. java弹窗_弹出窗口总结 - 王道JAVA - CSDNBlog
  7. 基于flask的网页聊天室(四)
  8. idea—开启Run DashBoard
  9. 64位BASM学习随笔(一)
  10. 安装vmware-tools遇the path is not valid path to the gcc binary和the path is not a valid path to th...
  11. web安全day28:一文读懂Linux日志,运维工程师必备
  12. 全网首发:怎样制作CDKEY(0)-目录
  13. python POST发送多个段(如json消息+文件)
  14. sap导入中文数据乱码
  15. java springboot图书借阅管理系统源码
  16. [BZOJ2959] 长跑
  17. 【NodeJS】Codecademy学习笔记
  18. 很NB的发现两个linux server 开发人或者站点(back-end-facility,codeday盛大代号:小虾米)
  19. macbook黑屏_Mac Book电脑黑屏开不了机三种解决方法
  20. 雪花飘落代码java_JavaScript实现雪花飘落效果

热门文章

  1. 我的第一份工作 (2007.2.28--2008.2.28) 上海三高计算机中心有限公司
  2. Myeclipse快捷键总结大全
  3. java数组 —(7)
  4. 在operator =中要处理“自我赋值”
  5. DataTable 转为ListT集合
  6. Cisco 3550-EMI 交 换 机 配 置 教 程
  7. 五分钟带你摸透 Vue组件及组件通讯
  8. 获取浏览器屏幕高度(js,jq) - 进击的小牛牛 - 博客园
  9. eclispe修改project Explorer字体大小
  10. 『原创』一个基于Win CE 5.0的Txt文件阅读器