Installing Tensorflow with CUDA, cuDNN and GPU support on Windows 10

setup accelerator for Deep Learning

Machine Learning and Deep learning need Hardware accelerator to train the models. Let’s see how can we setup our system for performing these training processes on our system.

First we should check the tensorflow site for GPU support to check the compatible version of the software need to be installed. So Click here and check the version to install.

screenshot of

List of software we need to install

  1. NVIDIA CUDA Toolkit 10.0

2. NVIDIA cuDNN 7.6.5

3. Microsoft Visual Studio 2017 community

4. Create virtual environment and install python.

5. Tensorflow -GPU 2.0.0

6. Opening the Jupyter Notebook

Here lets see by installing these but if want to install other versions you look for help in tensorflow by above link. So, Let’s start step by step:

Step:1 Installing NVIDIA CUDA Toolkit

  1. Go to the CUDA Toolkit 10.0 Archive. and download the .exe file by clicking on download.
CUDA Toolkit 10.0 Archive

2. After Downloading extract the “cuda_10.0.130_411.31_win10.exe” and double click to install the CUDA Toolkit. Follow the window and install it by doing default options.

Step:2 Installing NVIDIA cuDNN 7.6.5

  1. First step is to register to by clicking on JOIN NOW button and filling the required data and login to your account.
  2. Click on the check box to accept the rules and select Archived cuDNN releases.

3. Then Click on ‘Download cuDNN v7.6.5(November 5th, 2019)’ and than click ‘cuDNN Library for Windows 10’ and extract the file downloaded.

4. Copy the ‘cuda’ folder and copy it to your C drive.

5. Search for environment variable and open it. Then Click ‘Environment Variables’ >>select ‘path ’ in system variable>> click ‘edit’>> add path of folders inside ‘cuda ’folder.

Select environment variable
Select path and click Edit
Add path of folder inside cuda folder

Step:3 Installing Microsoft Visual Studio 2017 community

  1. Go to the following link [] and download Microsoft Visual Studio 2017 community.

2. Extract the ‘vs_Community.exe’ file downloaded by following instructions in pop up window. Remember it to download it only for mobile development and desktop development(as other are not necessary). It will take time to download and install.

Step:4 Create virtual environment and install python=3.6.10

  1. Open anaconda prompt and run:conda create -n gputest python=3.6.10

2. After this run :activate gputest

Step:5 Tensorflow -GPU 2.0.0

  1. Run in anaconda prompt to install tensorflow: pip install tensorflow-gpu==2.0.0
  2. For installing keras run: pip install keras==2.3.1
installing keras = 2.3.1

3. Now install Jupyter Notebook by running pip install jupyter notebook

4. Now you can also install all other libraries by using pip command.

pip install pandas
pip install seaborn
pip install sklearn
pip install matplotlib

Step:6 Opening the Jupyter Notebook

To open jupyter notebook for running model on gpu open Anaconda Prompt and follow the following steps:

  1. Activate the virtual environment by running
activate gputest
activate virtual environment (gputest)

2. Lunch the jupyter notebook

jupyter notebook
Launch jupyter notebook

Now its all done and your system is ready for running Deep learning models.

If you like the blog please clap that will appreciate me alot. !!! HAPPY CODING !!!.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store