Setting up CuDNN or Python 3 on Windows

Hi all

One of the biggest challenge for me in this Deep learning journey, is to get CuDNN working on Windows, and at the same time ensure compatibility to Python 3. Yes, I opted to go a different path from the recommended AWS and wanted to use my GPU.

I’ve gone through a lot of pain and I managed to get it to work. So if anyone is going through the same pain, just drop me a note and I’m more than happy to help!

2 Likes

Hi, Eu Jin Lok. That’s great that you were able to get it working. Would it be possible to write it up/script with bash and make it a wiki posting so that others can benefit from it? Several people wanted to get it working on Windows, but were struggling. The general consensus is stick with Ubuntu (I tried on windows and gave up).

1 Like

Good idea!

Hi! Could you give a few hints on how you got it working? Did you install stock CUDA Toolkit 8 from Nvidia homepage? (https://developer.nvidia.com/cuda-downloads)

Are you using cygwin or mingw or any of the sort, or did you just use Anaconda?

Hi @ejlok1
I plan to ask my IT department at work to upgrade my workstation to a more powerful machine with a new GPU for this course, but my work environment is a windows only environment, and not being part of the IT team, I will not have admin privileges on this workstation. I’m fairly comfortable working in the Linux environment, but since this is a work-owned machine, I will have to rely on entry-level techs in my IT department to install the dependencies for this on a Windows only machine (dual-boot is not allowed in our environment). How difficult will it be to get this working on a Windows workstation?

The non admin privilages might be a problem

The general steps to get it working on windows are

  • Install python 3 (installing it via anaconda is the simplest hassle free way)
  • Install nvidia tool kit
  • copy paste CUDANN dlls into the tool kit folder

Then you will have to install the specific python frameworks of your choice, but those you do via conda and pip so hopefully your restricted privileges should not be a problem.

Isn’t Visual Studio '15 also necessary from a practical standpoint? If I recall a lot of the libraries would not even install without a compiler? (my biggest :frowning: about Python)

Someone posted a link to a great comprehensive walk-through of a Windows setup… I’m confident its in the first page of topics still.

Anaconda more or less solves this problem, as it installs all the stuff needed to compile c libraries used by python libs

For me the biggest issue was not the software installation, but the software configuration. I wanted to use Python 3 and Tensorflow in Windows10 for the whole course. Obviously, this would not be the case. I had TF and Python3 working from other coursework. Running lesson 1 would execute fast using the GPUs but the results were not great. As most of you have found out by running the code and watching the lectures, the first few lessons need Theano as the loaded weights file to use were trained on Theano and not TF. So I went through and installed Ubuntu on a spare drive so I could see what successful code looks like while I worked out the Windows configuration.

I ended up removing all my software and started from scratch using one of the linked suggestions to https://github.com/philferriere/dlwin. While it was nice to have a walkthrough, IMO, I have found that some steps were left out, unnecessary software installed, and copious use of environment variables for Theano. Somethings would work, or only part way, etc. I eventually came upon https://github.com/Theano/Theano/issues/5348 which was referenced in that same thread on windows installation. I removed all my variables and handled everything in the config file “.tahnorc.txt”. After setting up my .theanorc.txt file per that link I am getting performance and results similar to Ubuntu.

While frustrating, for most people, I have learned so much along the way and where to look for information and what certain config options do and don’t do. I can’t wait to finish Part1 so I can see what lies ahead for Part2 setup and go on this journey again.