Setting Up CUDA, CUDNN, Keras, and TensorFlow on Windows 11 for GPU Deep Learning

  Переглядів 136,176

Jeff Heaton

Jeff Heaton

День тому

Complete walkthrough of installing TensorFlow/Keras with GPU support on Windows 11. We make use of a "pip install" rather than conda, to ensure that we get the latest version of TensorFlow. This requires installing Visual C++, CUDA, CuDNN, as well as the Python libraries.
Guide: github.com/jeffheaton/t81_558...
python -m ipykernel install --user --name tensorflow --display-name "Python 3.9 (tensorflow)"
0:54 Installation Guides
2:03 Step 1: NVIDIA Video Driver
3:49 Step 2: Visual C++
7:04 Step 3: CUDA
8:20 Step 4: CuDNN
12:38 Step 5: Anaconda and Miniconda
15:21 Step 6: Jupyter
16:31 Step 7: Environment
17:16 Step 8: Jupyter Kernel
18:13 Step 9: TensorFlow/Keras
19:46 Problems?
21:18 Test Jupyter
~~~~~~~~~~~~~~~ MY DEEP LEARNING COURSE ~~~~~~~~~~~~~~~
📖 Textbook - www.heatonresearch.com/book/a...
😸🐙 GitHub - github.com/jeffheaton/t81_558...
▶️ Play List - • 2023 Keras Version of ...
🏫 WUSTL Course Site - sites.wustl.edu/jeffheaton/t8...
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
🖥️ Website: www.heatonresearch.com/
🐦 Twitter - / jeffheaton
😸🐙 GitHub - github.com/jeffheaton
📸 Instagram - / jeffheatondotcom
🦾 Discord: / discord
▶️ Subscribe: ukposts.info...
~~~~~~~~~~~~~~ SUPPORT ME 🙏~~~~~~~~~~~~~~
🅿 Patreon - / jeffheaton
🙏 Other Ways to Support (some free) - www.heatonresearch.com/suppor...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Python #Tensorflow #Keras

КОМЕНТАРІ: 263
@Virat-Srivastava
@Virat-Srivastava Рік тому
Thankyou Sir... Cant express how happy i am after seeing this work. worked for 3 Days to find a correct guilde for this. 5 windows reset so previously experimented stuff don't mess with new installation. Note that version of Tensor flow compactable with this method is till 2.10.0 . after that you need wsl which whole new level of headache to install. 18:35 at this point just change to install tensorflow==2.10.0 . after this follow everything Jeff says.
@HeatonResearch
@HeatonResearch Рік тому
Thank you for the update, glad it works! This is a really good point, TensorFlow no longer supports native windows install (like this video does) beyond 2.10.0. Future versions need WSL2. I will be posting a video on this next week.
@DukeOfCurling
@DukeOfCurling Рік тому
I currently tried everything except for this one...wish me luck...nothing. even that didn't worked. This is tremendously upsetting me that all this process is so freaking hard to get it right. Any other suggestions? PATHs are correct as the tensorflow version too. I installed the latest cuda which is 2.12 nd the cudnn files but no luck
@cannabaro1442
@cannabaro1442 Рік тому
​@@HeatonResearcho Please...man.. I need big help to use cuda with 2.11 tf..........T.T
@steveszeto8968
@steveszeto8968 Рік тому
@@HeatonResearch Sorry, I can't use it successful and it output the bug of unfound the lib with cudart64_110.dll. However, I have it. Should I install again with it?
@itsbxntley2970
@itsbxntley2970 Рік тому
@@DukeOfCurling Me too,ended up with false on gpu...think the only option is to try the tensorf version 2.10 or with wsl2 trying that now
@jamilamuhammad5717
@jamilamuhammad5717 Рік тому
Jeff, I can't help being excited as this great tutorial set to be my research savior. I have been struggling with this since mid 2021, you are great. Thanks a bunch.
@Stray_Spectre
@Stray_Spectre Рік тому
I followed along for the cuDNN part trying to get it to work with a different program. I remember banging my head on a wall trying to get it going on my old Win 10 machine and couldn't figure it out on my new Win 11 machine. Adding the environmental variables did it. Your attempt to make this age well worked, as it still works with Cuda 12.1. Thank you so much.
@NeerajGupta-ot9eq
@NeerajGupta-ot9eq 2 роки тому
Providing simple seamless setups, doing gods work!
@bobparker6769
@bobparker6769 2 роки тому
Third version of tensorflow installed since 5/20/20, using your instructions; install ran with no issues, many thanks.
@meaburro8591
@meaburro8591 Рік тому
cannot express how happy i am to have come acros this video. I may have sunk 5+ hours with all the installations. thanks a bunch
@sandeepg9921
@sandeepg9921 Рік тому
Sir, thank you very much for this tutorial. I was performing this task since 6 hours but in vain. At last got to see your tutorial and finally helped me get the GPU for the Project work. Much appreciated, thanks a lot.
@D12075
@D12075 Рік тому
19:55 TRUE. Thanks for putting together a straight-forward guide on this. Many Saturdays were ruined in 2020 when I tried to do this, messed up and had start over!
@patrickhennessy4634
@patrickhennessy4634 2 роки тому
Thank you so much for this - you made the installation and setup seamless!
@tanhongkiat8196
@tanhongkiat8196 Рік тому
Thank you Sir for the detailed tutorials! I have spent much time trouble shooting these issues! Now I am ready to learn more on machine learning!
@Ingo-ns3qp
@Ingo-ns3qp 6 місяців тому
Sir Jeff, thank you so much! I was able to set up the CUDA stuff (following your detailed explanation) and can run the NVIDIA code samples from GIT. I am really happy! Again, thanks for this video.
@Andah69
@Andah69 Рік тому
love how you opened the windows gui to set the paths!
@Thotokk
@Thotokk Рік тому
Thank you for the nice explanations, I really spent days trying to fix this! I also got some DLL errors, although I did it exactly as in your video. In another guide they copied all the cudnn files in the Cuda subfolders, which seems cleaner. They also added two other lines into path as v11.7\bin and v11.7\libnvpp and the other two v11.7\extras\CUPTI\lib64 and v11.7\extras\CUPTI\include. That worked for me
@lucysumi6853
@lucysumi6853 2 роки тому
I watched so many tutorials and googled search, finally your video worked for me. Thank you so much.
@AhmedKhaled-oq9rx
@AhmedKhaled-oq9rx 2 роки тому
i can't tell you how much i appreciate what you have done, thank you ♥
@harshwardhanfartale
@harshwardhanfartale 8 місяців тому
Thank you so much for this video! I followed everything in this video perfectly down to the last-minute detail and it worked for me! Also yes you need to install tensorflow version 2.10.0 for this to work! Thank you!
@deepanshuchauhan8467
@deepanshuchauhan8467 9 місяців тому
Ah finally, after 3 days of doing this and doing that i finally found an actual video which helped me to install tensorflow.
@yuvisingh12345
@yuvisingh12345 2 роки тому
Thank You so much. Finally able to use the GPU
@jams2blues
@jams2blues Рік тому
You are awesome Jeff, thanks for doing these videos they have helped me significantly
@alimoghimi8532
@alimoghimi8532 2 роки тому
Thanks for your great tutorial video. I had so many problems with setting up tensorflow on GPU before seeing your video.
@HeatonResearch
@HeatonResearch 2 роки тому
You're welcome!
@martinpiceno10
@martinpiceno10 2 роки тому
Thanks a lot, this was very helpful and a great guide.
@kingtut11
@kingtut11 Рік тому
Jeff... i love you. thanks for providing a thorough af guide.
@tomerbrio4409
@tomerbrio4409 Рік тому
Thank you ! Just a little update regarding the installation of ip kernel. Run the following command: conda install -c anaconda ipykernel
@creative_cooper
@creative_cooper 2 роки тому
Wow... I spent the whole day yesterday struggling with tensorflow gpu installation. Finally got a solution!. Thanks professor.
@HeatonResearch
@HeatonResearch 2 роки тому
Great, glad this was helpful.
@danielotero8281
@danielotero8281 Рік тому
It helped me a lot, thanks for doing this!
@shubhamojhaa
@shubhamojhaa 8 місяців тому
i love you with all of my heart. thank you so much for this Jeff!
@devchoudhary8892
@devchoudhary8892 Рік тому
this is the best tutorial on cuda setup
@danielmacedo1910
@danielmacedo1910 4 місяці тому
Mr. Heaton! Thank you very much!! You are amazing!! It just helped me a lot!! Due to my GPU hardware (GTX family), I had do install precisely as you've shown and worked perfectly!! Oh, guys, I had to use TF 2.10
@deepanshumusicongo2172
@deepanshumusicongo2172 2 роки тому
This video solved a lot of trouble for me .... Thanks
@D12075
@D12075 2 роки тому
Jeff, it's like you're one or two months ahead of my hardware purchases! I was looking for windows 11 support because I sold my deep learning rig (I overestimated utilization % outside of work, and downshifted to an RTX laptop on sale. For those reading, a dual 3090 setup works quite well if you can find AIO water-cooled cards and acquire them at a good price.) I ran the numbers and for $20-30/month, I can just push my workload to databricks on GCP when I need it.
@kylequinn1963
@kylequinn1963 4 місяці тому
You are a god-send. I could not for the life of me get CUDA to install properly, turns out I needed to install that MS community edition software first.
@AegeanEge35
@AegeanEge35 9 місяців тому
Thank you for sharing this clear explanation
@chandanchandel5507
@chandanchandel5507 Рік тому
Thank you so much! I really appreciate this!
@mohammadsalehipak3194
@mohammadsalehipak3194 2 роки тому
The best video found after one month
@lucasbaroneperes1903
@lucasbaroneperes1903 8 місяців тому
The only video that solved my issue!
@repia9290
@repia9290 2 роки тому
You solved my problem.thank you!
@garriedaden4168
@garriedaden4168 Рік тому
Very helpful. Many thanks.
@pranav9176
@pranav9176 Рік тому
thanks a ton, this was quite helpful
@ninjalennon1244
@ninjalennon1244 Рік тому
Great video, thank you so much!
@akshaydongare2136
@akshaydongare2136 2 роки тому
Thank you so much for this! Very helpful!!
@HeatonResearch
@HeatonResearch 2 роки тому
You're so welcome! Thanks!
@astanalavista
@astanalavista 2 роки тому
Perfect guide!!! Nice
@askerycanabarro
@askerycanabarro 9 місяців тому
Thanks Jeff. A lot!
@ND15X
@ND15X 2 роки тому
Your content is amazing!!!
@abderemanesoilihi6061
@abderemanesoilihi6061 2 роки тому
Thank you, sir!
@rishabhsheoran6959
@rishabhsheoran6959 Місяць тому
Very helpful video Jeff! Thanks a lot! I was unable to see my GPU for: tf.config.list_physical_devices() I found out that tensorflow does not support gpu after 2.10.0 for Windows so I got that version and python 3.9 or 3.10 and finally everything worked. If anyone is facing the same problem, follow jeff's steps and use the above configuration I mentioned.
@SefaBlacksmithson
@SefaBlacksmithson Рік тому
you are the best teacher thank you
@popi3789
@popi3789 Рік тому
Thank you SO much. I've been looking for a solution for days to force a ML algo to go through my GPU, and I couldn't get tensorflow to detect my GPU accurately. I can tell you the heaven songs played for me all right when I saw the "True" ^^ Also I precise that I had to stick to Cuda 11 (I chose 11.2 according to the compatibility tables of tensorflow/cuda/cudnn) and tensorflow 2.5, because as I understood, tensorflow now doesn't work anymore for windows. Let's see now whether I can launch my script through the GPU in Jupyter...Fingers crossed! Thank you again though :) 🤩
@irrelevant_idea
@irrelevant_idea Рік тому
Thanks very much. Tried many ways but today it worked successfully👍...
@himanshukandpal5585
@himanshukandpal5585 Рік тому
Hey Satyasheel, in the latest tensorflow documentation, i cannot find any paths for cudadnn. did you skipped that part?
@maulikgoswami3907
@maulikgoswami3907 6 місяців тому
thank you bro , love you
@user-withoutend
@user-withoutend 2 роки тому
Thanks a lot. I can finally work.
@rafalaguna6873
@rafalaguna6873 Рік тому
thank you, you literally saved me
@lucuzzo96
@lucuzzo96 2 роки тому
Professor, I think I love you... You saved my day!
@HeatonResearch
@HeatonResearch 2 роки тому
Glad to hear it!
@anandakhan4160
@anandakhan4160 Рік тому
beautiful, thanks.
@andrewh5640
@andrewh5640 2 роки тому
Thank you as always!
@HeatonResearch
@HeatonResearch 2 роки тому
You are very welcome!
@spacecat3630
@spacecat3630 Рік тому
Thank you so much!
@SpiritVector
@SpiritVector Рік тому
I can definitely tell you absolutely love Microsoft buddy.
@remedycodes1547
@remedycodes1547 2 роки тому
Thanks alot man.
@sohamagarwal00
@sohamagarwal00 Рік тому
Thank you so much ! My GPU mx150 is still pretty bad xD cant see much difference. But it works!
@MegaNurri
@MegaNurri Рік тому
Thank you so much! This worked like a charm! 👍👍👍 Takes a lot of space though 😅
@HeatonResearch
@HeatonResearch Рік тому
Glad it helped!
@NihalKumar
@NihalKumar Рік тому
Cuda 11.6 only supported with windows 11 now, which version u hv installed
@driesmichiels4184
@driesmichiels4184 2 роки тому
After following this video, if you're kernel stops after you try to train a neural net in jupyter and your anaconda prompt says "Could not locate zlibwapi.dll. Please make sure it is in your library path!" Try to locate this file in “C:\Program Files\Microsoft Office oot\Office16\ODBC Drivers\Salesforce\lib” and copy pasted this file into “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin” This worked for me!
@christopheprotat
@christopheprotat Рік тому
Thanks a lot for this tutorial. I would be interested in having the same for Ubuntu . I am beginner and love the way you approach things. Thanks a lot again
@christopheprotat
@christopheprotat Рік тому
Forget about my question. Just watched your video on WSL2. Looks exactly what I need. You made my day. Thanks again for the great content
@29mohanapriya72
@29mohanapriya72 10 місяців тому
Thank you so much
@marc1190
@marc1190 9 місяців тому
So for anyone experiencing DLL problems the issue seems to be with the manual install of CUDA (as opposed to conda) which automatically adds some values to PATH. If you select the most recent version of CUDA to install (I chose 12.x) these values are not what TensorFlow 2.10 is expecting hence it can't find the DLLs. Tensorflow 2.10 is required since that's the last version which natively supported GPU. pip install tensorflow==2.10 So if you do want to proceed with the manual install then I'd imagine you need cudatoolkit=11.2 cudnn=8.1.0 in order for it to work. I didn't test this, I just installed them via conda "conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0" and its working now. Thanks to @Jeff for helping me see the wood for the trees!
@jaoidkrairi4478
@jaoidkrairi4478 2 роки тому
merci beaucoup tout est parfait
@FalseZer0
@FalseZer0 2 роки тому
Thank you!
@hemantkumardas3333
@hemantkumardas3333 5 місяців тому
Thanks sir...
@elnino1193
@elnino1193 2 роки тому
Thank you 😃
@jas.moreira
@jas.moreira Рік тому
Thank you!!!
@TheJokesters19
@TheJokesters19 11 місяців тому
THANK YOU SIIIIIIIIIIIIR
@cmatiolli13
@cmatiolli13 2 роки тому
thank you for this tutorial
@HeatonResearch
@HeatonResearch 2 роки тому
You're welcome 😊
@isaackafshkanan509
@isaackafshkanan509 Рік тому
Thanks Jeff 🙏! Will Pytorch gpu work aa well or we still need to type " conda install Pytorch torchvision torchaudio cudatoolkit=11.3 cuDNN= 3.2 ?
@germancruz6618
@germancruz6618 9 місяців тому
I have GPU Nvidea 4060TI. What version of cuda would you recommend?
@vijayalakshminiranjan276
@vijayalakshminiranjan276 Рік тому
Hello, Sir. Thank you for posting the installation video. After installing Visual Studio 2022, I have a question. I installed Cuda 11.5 as you recommended, but it reports that no supported version of Visual Studio was found. Some CUDA toolkit components will not function properly. To get full functionality, you must first install Visual Studio. But I already installed Visual Studio. Could you please assist me with this problem? Reply me ASAP
@sherifbadawy8188
@sherifbadawy8188 Рік тому
Thank you
@ezzal-deenal-hammadi1027
@ezzal-deenal-hammadi1027 2 роки тому
For the Nvidia Driver Download, mine is GTX 1050 Ti and in options it says either I download Game Ready Drivers or Studio Drivers. My question is which one to install? also I am using Pycharm, so do I need to install jupyter?
@avtregub
@avtregub 2 роки тому
thanks a lot
@gustcol1
@gustcol1 2 роки тому
thanks for your help.... :)
@HeatonResearch
@HeatonResearch 2 роки тому
You're welcome! Glad it was helpful.
@user-en9ob4bn5v
@user-en9ob4bn5v 4 місяці тому
hey there! sorry for off the topic question, but which display monitor do you use?
@surajgupta4438
@surajgupta4438 Рік тому
Hi Jeff, thank you so much for the video. GPU is been integrated with tensorflow successfully but when running a program kernel died notification is comming and show no module named matplotlib is found and when installing matplotlib my tensorflow GPU is not working. It will be helpful if you can help me on this
@aliali-sj9jp
@aliali-sj9jp 2 роки тому
Thank you for this wonderful explanation Professor . I have a question I don't know what made me think about this . but I have a laptop with a processor intel(R) Core(TM) i7-7500U CPU @ 2.70GHz 2.90 GHz. Can I Set Up CUDA, CUDNN, and TensorFlow GPU on Windows 10>>>>thanks very much
@karolstylok542
@karolstylok542 Рік тому
What do I need to install for tensor cores and what should I install if I want to use LSTM cells?
@roopanagbhushan7255
@roopanagbhushan7255 6 місяців тому
In TF Install Guide , it was mentioned to install MS Visual Studio 2019 , and you have installed 2022 version , won't it cause a problem??
@qikeshi1219
@qikeshi1219 2 роки тому
Sorry, can I ask why it shows: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bart 'C:\Program' is not recognized as an internal or external command, operable program or batch file." When I can not run vcvars64?
@plumberski8854
@plumberski8854 9 місяців тому
Hope that you can shine some light for me. I just got a 4070 GPU (for Python AI learning). Installed Pycharm, tensorflow, keras, etc. Tested running it with CPU only and with GPU. About 80 times faster with the GPU. What you have shown here is a lot more than what I thought. And the many steps worry me. With the installed Tensorflow, I thought then it will use the CUDA cores. Do I need to do what you have shown to make use of the CUDA? A ball park figure, how many times faster will it be with just tensorflow and with CUDA installed? Many thanks. P/S Thanks for this video. Nvidia's instructions are too advanced for me to understand. Guess due to the many steps, and complexities.
@piyalidas
@piyalidas 7 місяців тому
i am not able to statrt jupyter note getting following error"book (base) C:\Windows\System32>jupyter notebook Traceback (most recent call last): File "C:\ProgramData\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in from notebook.notebookapp import main ModuleNotFoundError: No module named 'notebook.notebookapp'" how to resolve this , i have googled the error and tried the pip install etc.. stil doesnt work
@shmeckles999
@shmeckles999 11 місяців тому
um doesnt tensorflow recommend running wsl 2? that's where I'm stuck on between wanting to use it as OS
@roopanagbhushan7255
@roopanagbhushan7255 6 місяців тому
Can I just install Visual Studio C++ redistributable only ,, or is the whole MS Visual Studio needs to be installed??
@zohebahmad9633
@zohebahmad9633 7 місяців тому
for whatever reason, my mobile gtx 1660 TI just doesn't seem to work well with cuda (it seems). physical_devices('GPU') is 0 after doing everything right. even importing device_lib and returning ever device in device_lib.list_local_devices() only returns ['/device:CPU:0']... never a GPU... Anyone else facing this problem solved it?
@wildreams
@wildreams 10 місяців тому
Do I need visual Studio? Can I use Spyder?
@geleshgomathil3274
@geleshgomathil3274 Рік тому
I run into issues of Conda wasnt working with python=39 and not intsaling ipkernal, resolved BY conda config --remove channels conda-forge conda config --add channels conda-forge conda update conda
@DesXboy
@DesXboy 2 роки тому
the \include path at min 12:00 is not the one inside CUPTI or is it?
@lingfeizhang9411
@lingfeizhang9411 Рік тому
Im getting that the len is 0 (so no GPU found), but with no error message. Would you have any ideas of why that could be the case?
@nikemusically
@nikemusically Рік тому
hi i am having issues with installing the tensor flow
@AegeanEge35
@AegeanEge35 9 місяців тому
Hi what makes difference if I dont use anaconda here? I mean what anaconda ensures easily than other because many people in GPU acceleration considering and giving their examples with anaconda
@jahidtanvir
@jahidtanvir 9 місяців тому
Sir, I am getting "kernel appears to have died jupyter notebook" pop-up whenever I try to run model.fit() function. I have installed tensorflow 2.10 following your instruction and official tensorflow pip installation guideline. What should I do? Please Help
@user-iv1og8zn8d
@user-iv1og8zn8d 8 місяців тому
Cuda is self-installing now.
@sharjeel_mazhar
@sharjeel_mazhar Рік тому
Can we uninstall visual studio completely after setting it up?
@alexi_space
@alexi_space Рік тому
how can I run my project from windows with wsl in Visual Studio?
@ChaiTimeDataScience
@ChaiTimeDataScience 2 роки тому
One day I will convince professor Jeff to switch to Torch (and also JAX)!
@HeatonResearch
@HeatonResearch 2 роки тому
I do Torch as well... this video happens to be on Keras. :-)
@puranjitsingh1782
@puranjitsingh1782 5 місяців тому
I've installed cuda toolkit 12.3 and am not able to run gpu using tensorflow on that
Install Tensorflow/Keras in WSL2 for Windows with NVIDIA GPU
9:59
Jeff Heaton
Переглядів 64 тис.
Windows 11 Settings You Should Change NOW!
6:32
Leila Gharani
Переглядів 1,4 млн
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Переглядів 33 млн
CUDA and cuDNN - HOW TO DOWNLOAD, INSTALL AND VERIFY (English Subtitles)
18:30
Степан Громов
Переглядів 9 тис.
CUDA Simply Explained - GPU vs CPU Parallel Computing for Beginners
19:11
Python Simplified
Переглядів 221 тис.
Getting Started with Python Deep Learning for Beginners
1:10:44
Nicholas Renotte
Переглядів 170 тис.
Tutorial: CUDA programming in Python with numba and cupy
45:43
nickcorn93
Переглядів 70 тис.
CUDA Explained - Why Deep Learning uses GPUs
13:33
deeplizard
Переглядів 221 тис.
Big Tech AI Is A Lie
16:56
Tina Huang
Переглядів 56 тис.
Let's build GPT: from scratch, in code, spelled out.
1:56:20
Andrej Karpathy
Переглядів 4,2 млн
But what is a neural network? | Chapter 1, Deep learning
18:40
3Blue1Brown
Переглядів 16 млн
Первые продажи Ryzen на Ozon и первый возврат! 😱
13:17
Герасимов Live
Переглядів 31 тис.
Що покаже Apple, гнучкі айфони та Windows переходить на ARM
17:49
Ноталка Шелягіна
Переглядів 60 тис.