Project, Research

Neural Networking for Dummies 6 – Finally installed tensorflow!!!

Last time I left off still trying to install tensorflow. To recap, tensorflow for CPU gives an error about AVX2, and tensorflow gpu gives me an error about a DLL failing to load. For now I’m going to go full steam ahead on the GPU since it’ll have better performance in the long run anyway, plus I’m learning a lot in the process.

Oh it’s been a blast -_-

After trying and failing to install tensorflow about 10 times, I am fairly certain of two things:

  1. My Intel processor error that references AVX instructions most likely means my CPU is not compatible with tensorflow cpu
  2. tensorflow-gpu is an even bigger nightmare to install due to requiring different versions of other software that are apparently causing problems
Time to start all over again…but really glad uwong took the time to share how they resolve this problem!

So my new plan is to ensure that I have tensorflow-gpu v1.4.0, keras v2.0.8, CUDA v8.0 and cuDNN v6.0. Right now I’m fairly confident it’s just software version incompatibilities, so I’m feeling pretty good at my chances of figuring this out. Plus there are more people who have customized builds that were shared in issue 22872 on GitHub that I can also look into later if the above doesn’t work.

Yeah, totally, this is a piece of cake

Again I’ll stick to bullets with what I’ve done:

At this point, I decided to stop and reflect on the original instructions from tensorflow since I was now a lot further along in my learning. I saw that it said I needed CUDA 10.0, but I had installed CUDA 10.1. I have no idea if it makes that much of a difference, but I figure I’d give that a shot first. Although it sounds like using this version of CUDA requires installing from source, so if this doesn’t work I’ll have to decide whether I use old versions of software or if I try the instructions here.

I am truly shooting in the dark here

I’m also going to pre-emptively switch to cuDNN v7.4.1 for CUDA 10.0 since the latest release was only a month ago. I have no idea if that’ll make a difference, but I’d rather be safe than sorry.

After installing CUDA 10.0 and cuDNN 7.4.1, I reopened Anaconda and typed in the following:

activate tensorflow 
python
import tensorflow as tf

And…nothing happened? So I googled and found out THAT MEANS IT WORKS!!!!!!!!!!!!!!

Yaaaaaasssssssss!!!!

AND NOW!!! … I have no idea what to do. So back to my old posts to dig around and see what exactly I was in the middle of…Eventually I went back to the Command Prompt and typed in the test to make sure it’ll work:

python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
Success?

It’s finally time to try and get the actual neural network program working!

But since I do these projects solo I’ll just have to high five myself

At this point, I realized it was time to take a step back and study up on python programs and github in general. I have some background in python from Udacity classes, but not enough to make sure I’m doing the remainder steps properly. I also have seen github before, but I’ve never really learned anything about it, so might as well do myself some learning. I’ll finish this post off with a list of things I read through before continuing on with the next steps in this project.

And I’ve finally reached the part of the project where I’ve learned way too much in a short period of time…

And finally after reading all of that I decided that the best thing to do….is to start over. Clean everything out and do fresh installs now that I know what software versions are compatible. I may even take the time to add Linux as a bootable option on my PC and install everything on that OS instead just to get more experience with that system. So yeah…that’s where I’ll leave things now. Victory?

Image may contain: cat
I’m just gonna go hug this cat and come back to this later

Leave a Reply