Showing posts with label Machine Learning. Show all posts
Showing posts with label Machine Learning. Show all posts

25 September 2018

Install CUDA toolkit 10 and cuDNN 7 for Tensorflow on Windows 10


Ah well !!!!!, after multiple failures in correctly installing the CUDA toolkit 10.0.130  for use in Image Classification using machine learning/deep learning , here is my learning on installing the same.

First things First: Disable the Anti-Virus and Ensure that there is no update going on in Win 10.

Contents:
Step 1: Installation of Visual Studio 2017
Step 2: Installation of CUDA toolkit 10
Step 3: Installation of cuDNN 7
Step 4: Fix the path environment variable
Step 5: Install Tensorflow GPU
Step 6: Verify Tensorflow GPU installation

Step 1: Installation of Visual Studio 2017:


The first step is to install Visual Studio 2017. I use the Visual Studio Community Edition . The most important thing to note here is that you need to select  Win 10 SDK  and VC++ 2015.3 v14.00 (v140) toolset for Desktop.




In case you have not selected the above and installed Visual Studio, you will end up with an error like this when testing the installation of CUDA:

error MSB8036: The Windows SDK version 10.0.15063.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution"

But just in case you have already installed Visual Studio,  Relax !!!!! .  You just need to go back to the Visual Studio Installer , choose the Modify option and then install the individual components that were left our earlier.


Step 2: Installation of CUDA toolkit 10


Download the CUDA toolkit  and choose Custom Install. The Display Drivers that come with the CUDA toolkit are not necessarily the latest. So it is better to choose the Custom Install and uncheck the "Display Driver".

11 July 2018

Google Colab for Machine Learning


GPU was a problematic issue for many of us who want to experiment with  Machine Learning and Deep Learning modules.  Not Anymore !!!!!

Colaboratory is a Google research project and presently it supports free GPU.  It's a Jupyter notebook environment that requires no setup to use and runs entirely in the cloud. Colaboratory notebooks are stored in Google Drive and can be shared just as you would with Google Docs or Sheets. Colaboratory is free to use. For more information, see the Google Colab FAQ

Am I using GPU ?

import tensorflow as tf
tf.test.gpu_device_name()

If you are using GPU, you will receive a message like this:







If you are Not using GPU, you will receive a message like this: