Mike Pfau
001678.jpg

Sketchblog

A virtual extension of my sketchbook. 

Installing TensorFlow 1.3 with GPU on Windows 10

Follow this guide to get TensorFlow 1.3 up and running on you Windows 10 machine. Follow the directions step by step and make sure all dependencies are loaded. Let get started with machine learning...

Environment Requirements.

  • Windows 10 64bit
  • NVidia GPU with CUDA.
    • You can check here if your GPU is CUDA compatible.
      • The one attached to this system is a NVIDIA GeForce GTX1080ti 8GB.
      • Check if its is 3.0 Compute or higher.
  • MS VISUAL STUDIO 2017
  • CUDA 8.0
  • cuDNN 6.0
  • ANACONDA 64BIT 
  • PYTHON 64bit 3.5.2
  • TensorFlow 1.3 with GPU

Process

  1. Installing MS Visual Studio 2015/17

    1. Go here to download Visual Studio Community 2017. https://www.visualstudio.com/
    2. Download and Install.
    3. Check C++ compiler is checked in options.
  2. Setting up your NVidia GPU

    1. Download and install CUDA Toolkit
      Toolkit version 8.0 or above: https://developer.nvidia.com/cuda-downloads
      Example installation directory: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
    2. Download and install cuDNN
      1. cuDNN version 6.0 library for Windows 10: https://developer.nvidia.com/cudnn
      2. Now extract the cuDNN files into your Toolkit directory. 
    3. Environmental variables
      Ensure after installing CUDA toolkit, the CUDA_HOME is set in the environmental variables. If not then you need to add it manually..
      1. Start search "environment variables" and open the window.
      2. add paths to environment variables system "path" variable. It should contain a string of other entries. 
      3. C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin
      4. C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp
      5. C:\deeplearning\cudaDNN\bin
  3. Install Anaconda

    1. Download Anaconda 

      1. Anaconda3-4.2.0-Windows-x86_64.exe | 391.4M 2016-09-27 15:57:210ca5ef4dcfe84376aad073bbb3f8db00

      2. Or look through the repo here. https://repo.continuum.io/archive/

    2. Install Anaconda

  4. Create Conda environment.

    1. Close any open consoles and reopen a command console (not powerShell) to create new environment, with the name tensorflow-gpu with python version 3.5.2
    2. conda create -n tensorflow-gpu python=3.5.2
    3. Look here for Conda documentation. https://conda.io/docs/user-guide/tasks/manage-python.html 
  5. Install TensorFlow in Conda Environment

    1. To intilize the Conda environment in the command console type:

    2. c:\deeplearning\MyNets> Activate tensorflow-gpu 
      1. Make sure you see the command prompt change into the Conda environment you created. You should see something like this. 
      2. (tensorflow-gpu) c:\deeplearning\MyNets>
    3. Now install TensorFlow 1.3 GPU  (at time of writing)  with PIP.

      1. (tensorflow-gpu) c:\deeplearning\MyNets> pip install tensorflow-gpu
  6. Test TensorFlow GPU Install.

    1. Make sure you have your proper Conda environment in front of prompt i.e. (tensorflow-gpu). Enter into a python shell
    2. (tensorflow-gpu) c:\deeplearning\MyNets>python
      1. >>>import tensorflow as tf

      2. >>>sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

    3. Remember use Command Prompt not PowerShell.

 

Happy learning!

Pfau

 

More resources.

cuDNN https://gogul09.github.io/helpers/deep-learning-windows

https://www.nvidia.com/en-us/data-center/gpu-accelerated-applications/tensorflow/

https://www.youtube.com/watch?v=Ebo8BklTtmc

https://nitishmutha.github.io/tensorflow/2017/01/22/TensorFlow-with-gpu-for-windows.html

 

 
tutorialsMike Pfau