Machine Learning with GPU (2): cuDNN

If you working with Machine Learning using GPU this story is the answer. But before you continue to read this story, please read story : Machine Learning with GPU (1) : CUDA

“The NVIDIA CUDA® Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers. (source:


This script is for checking num of gpu available using tensorflow.

should return :

At least 1,

If you run script above, and you got this error :

So you need to install cuDNN.

You can download cuDNN from this link. You need to login if you want to download. Don’t worry, just login or register, it’s easy and free.. After open the link, choose this:

copy to the cuda folder. If you use ubuntu 20.04 :

add read permission to both these target directory

do symlink to this folder, to make libcudnn recognizable to tensorflow or some apps :

and now should return :

At least 1,,