cudnn

DeepLearning入门笔记(一),准备工作与注意事项

妖精的绣舞 提交于 2019-12-30 01:54:00
本文记录了安装theano、keras、tensorflow以及运行tutorial程序时遇到的一些问题,供后人参考。 实验机器:联想笔记本,i7-6700HQ,GTX960M,16G内存,SSD硬盘,64位Ubuntu 16.04 LTS 备注: 不推荐windows,会遇到各种不兼容问题。Ubuntu最好使用16.04这个版本,低版本的Ubuntu可能出现显卡驱动不支持等问题。 Ubuntu16.04 装好后,注意将系统默认的显卡驱动改为nvidia的驱动,并更新显卡驱动,我用的是version 367.48。 TensorFlow的gpu版本安装比较麻烦,由于CUDA版本兼容问题,如果使用当前最新的CUDA 8.0,则需要自己重新编译TensorFlow源代码,然后本地安装。 建议先安装Theano和Keras,流程相对容易,早点跑出“hello world”,增强信心。 安装Theano作为后端的Keras: 详细流程可参见 http://keras-cn.readthedocs.io/en/latest/getting_started/keras_linux/ 流程中安装CUDA和cuDNN时,应选择CUDA 8.0和cuDNN 5.0,安装完毕后,一定要记得重启电脑!否则运行tutorial代码会提示no CUDA-capable device is detected

OpenCV4.2 版本 DNN模块使用CUDA加速教程 VS2017 Window10

白昼怎懂夜的黑 提交于 2019-12-29 20:24:49
目录 CUDA安装与配置 cuDNN CMake编译 运行测试 总结 本文转载: OpenCV学堂 CUDA安装与配置 根据自己的GPU 选择合适的版本,我的是RTX2080Ti,选择CUDA10.0版本,按照默认地址安装就好,安装完之后看是否有环境变量。没有的话自己加上。 以及, cuDNN cuDNN一定要7.5版本以上,否则CMake将无法识别出cuDNN路径。 打开下载好的cuDNN,如下图 将cuDNN中bin、include、lib文件夹中的文件放入对应CUDA路径下的文件夹中 CMake编译 打开CMake,选择源码路径,以及生成路径,选择对应VS版本。开始第一次Configue。 其中会下载一些第三方文件,可以自行下载,否则速度较慢。第一次configure完成之后,勾选BUILD_opencv_world. 以及,勾选OPENCV_DNN_CUDA,选择解压好的opencv_contrib中modules路径添加进来。 勾选WITH_CUDA。 进行第二次Configure,Configure完成之后可能会报错,此时不管他,根据GPU算力表选择合适的CUDA_ARCH_BIN值,如我的是RTX2080Ti,则将CUDA_ARCH_BIN其余值删除,只留下7.5。然后勾选CUDA_FAST_MATH,点击Configure。 等待Configure完成之后

Win10环境+ CUDA9.0 +CUDNN7.0+TensorFlow1.7/1.6/1.5配置(亲测有效)

五迷三道 提交于 2019-12-26 10:23:24
前言:很多小伙伴在选择CUDA版本和cudnn版本上有疑问,这里简短的说一下,希望能帮到各位小伙伴,我在网上看到有人说,要根据自己的显卡来选择CUDA,其实是错误的,你可以下载自己所需要的CUDA版本,这只是个驱动而已。CUDA的版本和cundd的版本要对应,不然可能会有不兼容报错。CUDA是显卡驱动程序,cundd是用来加速深度学习训练的库,在训练网络时,使用GPU加速,会调CUDA驱动和cudnn库,安装时两者要联系起来,本文的第二步,就是做这个事。 系统环境:windows10 64位 显卡:GTX1060 CUDA版本:cuda_9.0.176_win10(配套的cudnn一定要是7版本) 下载地址: https://developer.nvidia.com/cuda-90-download-archive CUDNN版本:cudnn-9.0-windows10-x64-v7(7版本的) 下载地址: https://developer.nvidia.com/cudnn TensorFlow-gpu版本:TensorFlow1.7(1.6和1.5也支持) 1.下载CUDA, https://developer.nvidia.com/cuda-90-download-archive 按照自己机器的信息选择,下图是我自己机器信息: 下载完之后直接点击运行,会自行安装

NVDIA显卡驱动, CUDA, cuDNN概念及安装顺序

て烟熏妆下的殇ゞ 提交于 2019-12-25 19:49:31
1 、什么是CUDA CUDA(ComputeUnified Device Architecture),是显卡厂商NVIDIA推出的运算平台。 CUDA是一种由NVIDIA推出的通用并行计算架构,该架构使GPU能够解决复杂的计算问题。 2 、什么是CUDNN NVIDIA cuDNN是用于深度神经网络的GPU加速库。它强调性能、易用性和低内存开销。NVIDIA cuDNN可以集成到更高级别的机器学习框架中,如谷歌的Tensorflow、加州大学伯克利分校的流行caffe软件。简单的 插入式设计 可以让开发人员专注于设计和实现神经网络模型,而不是简单调整性能,同时还可以在GPU上实现高性能现代并行计算。 3、CUDA与CUDNN的关系 CUDA看作是一个工作台 ,上面配有很多工具,如锤子、螺丝刀等。 cuDNN是基于CUDA的深度学习GPU加速库 ,有了它才能在GPU上完成深度学习的计算。它就相当于工作的工具,比如它就是个扳手。但是CUDA这个工作台买来的时候,并没有送扳手。想要在CUDA上运行深度神经网络,就要安装cuDNN,就像你想要拧个螺帽就要把扳手买回来。这样才能使GPU进行深度神经网络的工作,工作速度相较CPU快很多。 cuDNN是一个SDK,是一个专门用于神经网络的加速包,注意, 它跟我们的CUDA没有一一对应的关系

CUDA_ERROR_LAUNCH_FAILED with Tensorflow and Keras

坚强是说给别人听的谎言 提交于 2019-12-25 04:02:25
问题 I'm using Keras to train a convolutional neural network using the fit_generator function as the images are stored in .h5 files and don't fit in memory. Most of the times I'm not able to train the model as it gets stuck in the middle of the first epoch, or it crashes saying 'GPU sync failed' or 'CUDA_ERROR_LAUNCH_FAILED' (see the logs below). The training using the CPUs works well but of course it is slower. I'm using two different machines and both have the same issues. My guess is that it is

docker挂载NVIDIA显卡运行pytorch

对着背影说爱祢 提交于 2019-12-24 21:09:06
本文为作者原创,转载请注明出处(http://www.cnblogs.com/mar-q/)by 负赑屃 写在前面:   请参考之前的文章安装好CentOS、NVIDIA相关驱动及软件、docker及加速镜像。   主机运行环境 $ uname -a Linux CentOS 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux $ cat /usr/local/cuda/version.txt CUDA Version 8.0.61 $ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 #define CUDNN_MAJOR 6 #define CUDNN_MINOR 0 #define CUDNN_PATCHLEVEL 21 #define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL) #include "driver_types.h" # NVIDIA 1080ti 一、关于GPU的挂载 1. 在docker运行时指定device挂载   先查看一下有哪些相关设备 $ ls

How to create a CNN with deterministic operations in TensorFlow on a GPU?

强颜欢笑 提交于 2019-12-24 08:46:24
问题 So after I realize there are operations in TensorFlow which are non-deterministic, see this Question: How to get the same loss value, every time training a CNN (MNIST data set), with TensorFlow?, I want to know: How can I build a convolutional neural net with: TensorFlow Version 1.1.0 CUDA release 8.0, V8.0.61 cuDNN 5.1.10 run on GPU which use only deterministic operations? 回答1: You can't until every operation on cuDNN is not completely deterministic. Moreover, even moving every operation on

Tensorflow Bazel 0.3.0 build CUDA 8.0 GTX 1070 fails

岁酱吖の 提交于 2019-12-24 07:47:52
问题 Here are my specs: GTX 1070 Driver 367 (installed from .run) Ubuntu 16.04 CUDA 8.0 (installed from .run) Cudnn 5 Bazel 0.3.0 (potential problem?) gcc 4.9.3 Tensorflow installed from source To verify versions: volcart@volcart-Precision-Tower-7910:~/$ nvidia-smi Fri Aug 5 15:03:32 2016 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.35 Driver Version: 367.35 | |-------------------------------+----------------------+----------------------+ | GPU

How does one have TensorFlow not run the script unless the GPU was loaded successfully?

心不动则不痛 提交于 2019-12-24 07:44:24
问题 I have been trying to run some TensorFlow training on some machine with GPUs however, whenever I try to do so I get some type of error that seems to say it wasn't able to use the GPU for some reason (usually memory issue, or cuda issue or cudnn etc). However, since the thing TensorFlow does automatically is to just run in CPU if it can't use the GPU its been hard to tell for me if it was actually able to leverage the GPU or not. Thus, I wanted to have my script just fail/halt unless the GPU

How does one have TensorFlow not run the script unless the GPU was loaded successfully?

若如初见. 提交于 2019-12-24 07:43:04
问题 I have been trying to run some TensorFlow training on some machine with GPUs however, whenever I try to do so I get some type of error that seems to say it wasn't able to use the GPU for some reason (usually memory issue, or cuda issue or cudnn etc). However, since the thing TensorFlow does automatically is to just run in CPU if it can't use the GPU its been hard to tell for me if it was actually able to leverage the GPU or not. Thus, I wanted to have my script just fail/halt unless the GPU