0

I am just getting started with neural networks, and have a CNN that I want to speed up by running the process on my GPU. However I am having a lot of difficulty setting this up, different websites and tutorials I go to seem to be out of date or deprecated, and I keep getting led down rabbit holes and ending up nowhere.

I imported python and all of my modules including numpy, keras, etc., have been installing using pip and am running the code using visual studio code.

I have followed a few tutorials that seemed to have me updating/installing drivers, installing visual studio, installing the cuda toolkit, installing zlib, installing cuDNN, setting path variables and copying files since automatic installers were not there. And at this point I got stuck in understanding what I am doing and am very lost. If anyone has any advice or can reference an up to date tutorial please let me know! Primarily I was following this tutorial: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html?ncid=em-prod-337416, and got stuck at step 2.3.5, since I don't really know how visual studio works(I just installed it). It seems I am doing something really off so I would appreciate any advice or help even if you are uncertain!

talonmies
  • 70,661
  • 34
  • 192
  • 269
  • Advise. Yes, sure. Use linux. More specifically. Use Lambda labs stack to set up GPU acceleration. If you can set up a dual boot ubuntu. You can install Lambda stack. Windows in my experience, is just harder. – Quant1892387 Jun 08 '23 at 21:53
  • You don’t need to use Visual Studio like that if you are not going to *compile* code yourself which uses cudnn. If you only want to run frameworks already built with cudnn support, you just need to install the runtime libraries – talonmies Jun 08 '23 at 23:14
  • @talonmies I am creating my own cnns from scratch using keras,, and compiling it on my own computer. – Philip Nicoll Jun 09 '23 at 00:24
  • @Quant1892387 Do you have any advice for windows, or any place I can go to for good advice? I think it would cause more long run difficulties if I switched operating systems, considering windows is what I run everything else on and all I know. – Philip Nicoll Jun 09 '23 at 00:26
  • What does `tf.config.list_physical_devices('GPU')` give you? [According to documentation](https://www.tensorflow.org/guide/gpu) keras and tensorflow will run on a single GPU without any code changes. Have you seen [this issue](https://stackoverflow.com/questions/45662253/can-i-run-keras-model-on-gpu)? – scr Jun 09 '23 at 03:52
  • Yes, sure. I understand. Thats why I suggested a dual boot. That means, when you turn the computer on you'll be asked to pick an operating system. There is a learning curve but, if you're serious about this. The people on 'top' do not use windows. Your hesitation is very valid. Staying in Windows is very doable and a solid choice. My advise still stands. There will other benefits in the future. Regardless, if you put the work, you will get there. – Quant1892387 Jun 09 '23 at 18:48

1 Answers1

1

Please try again by following the step by step instructions mentioned in this TF install page to install tensorflow in your system and check all the Hardware/System requirements satisfied to setup GPU support with Tensorflow.

Please ensure you have installed python 3.7-3.10 and tensorflow <=2.10 to setup tensorflow GPU on Windows because GPU support on native-Windows is only available for 2.10 or earlier versions, starting in TF 2.11, CUDA build is not supported for Windows as mentioned in this tested build configuration.

Now try installing and launching the VScode from the same conda VirEnv where you have installed tensorflow and performed GPU setup.

Please check this similar issue for your reference.

TF_Renu Patel
  • 356
  • 1
  • 4