2020, TensorFlow 2.0 GPU (CUDA), Keras, & Python 3.7 in Windows 10
Вставка
- Опубліковано 8 вер 2024
- Here is an update, as of July 2020. • Installing TensorFlow/...
** Follow Me on Social Media!
GitHub: github.com/jef...
Twitter: / jeffheaton
Instagram: / jeffheatondotcom
Discord: / discord
Patreon: / jeffheaton
This video walks you through a complete Python 3.7 and TensorFlow install. You will be shown the difference between Anaconda and MiniConda, and how to create an environment inside of Anaconda for TensorFlow.
Step 1: Identify GPU Card [5:31]
Step 2: Download Setup Script [6:22]
About Environment Setup Script [6:56]
Step 3: Install GPU Driver [8:01]
Step 4: Install CUDA Driver [13:55]
Step 5: Install cuDNN [16:01]
Step 6: Install TensorRT (optional) [21:15]
Step 7: Install MiniConda [23:10]
Step 8: Install Jupyter [25:10]
Step 9: Run Setup Script [25:48]
conda env create -v -f tensorflow.yml
Step 10: Install Jupyter Kernel [27:53]
python -m ipykernel install --user --name tensorflow --display-name "Python 3.7 (tensorflow)"
Step 11: Test Everything
You can find the instructions here (from the video):
github.com/jef...
Other Platforms
Windows 10 CPU: • 2020, Installing Tenso...
Mac OSX CPU: • 2020, Installing Tenso...
Windows 10 GPU: • 2020, TensorFlow 2.0 G...
Please subscribe and comment!
Follow me:
UA-cam: / heatonre. .
Twitter: / jeffheaton
GitHub: github.com/jef...
Here is an update, as of July 2020. ua-cam.com/video/PnK1jO2kXOQ/v-deo.html
is there anyway i could contact you clear certain doubhts that i have
I appreciate your effort. It was so helpful and I spent one day for it and then I found your video luckily. At first I faced problem using your "tensorflow.yml" file, the packages were not installing and got stuck in the middle thrice. Later I used "conda env create -f tensorflow-gpu.yml" instead of "conda env create -v -f tensorflow-gpu.yml" and it worked fine. One thing to be mentioned I used tf 2.1.0 version as I had to download cuda 10.1 and other files(Cudnn - 7.6.5 and TensorRT - 6.0) according to the google installation guides as per your directions. I hope it may help people who face the same problem.
Thanks, had the same problem, this helped
Thank you so much for this. I have the same issue and this helped me.
thanks, I had the same error Running the Setup Script. Doing this command conda env create -f tensorflow-gpu.yml help.
Thank you so much man!
thank you man
Videos like this prevent thousands of hours of unnecessary struggling. Thank you.
never thought that installing tensorflow gpu would be this easy. This video is all you need. Thanks a lot.
There are so many tutorials about installing tensorflow-gpu online but yours has to be the most straight-forward and up-to-date one out there
I have watched so many videos but none of them worked till now. Thank you so much for this tutorial. It's working great now, on my NVIDIA GTX 1050ti.
did you follow jeff's cuda version or the updated once?
I used the updated ones, cuda 10.1
hey I have NVIDIA GTX 1050ti with max q, I wanted to know:
1. 1st option of Nvidia driver did you choose geforce 10 series(notebooks) or geforce 10 series
2..did you install cuda 10.1 update 2 (aug 2019) or (feb 2019)
@@abhinavtiwari2254 i have the same questions!
@@sararosiak987 I was able to do it.. I selected the notebook gpu type
Thanks Jeff. I used this as a guide to get TF GPU working on a Surface Book 3 15" with Nvidia Quadro RTX. The GPU drivers were installed by default so only had to install CUDA toolkit, cuDNN and TensorRT. Thanks again.
I had wasted a whole day for installing Tensorflow with GPU support.
This video is all you need to get started.
Thanks Jeff
Only one day, haha, I wish I knew...
Hey guys, just as a helpful note: The CUDA versioning has now been made "upward compatible" (i just made that term up), means that you no longer need the precise CUDA version - rather: just install whatever is INVIDIA's latest default drivers is for your GPU. Consequentially - you'll see that there's no longer a dropdown for CUDA version on their website anymore. Tick.
very nice tutorial! it worked perfectly fine with me with no errors (tested it on K20c with cuda 10.1
Glad it helped
Thank you Professor Heaton. I have tried half a dozen tutorials on how to set this up on my cpu using my gpu and yours is the first to finally work so i am no longer bound to colab. I also learned numerous other solutions to issues i was having setting up python and other packages before this video. Thank you again very much
Jeff, this was great. I'll definitely look into your class to pick up some more ML skills. As an aside to everyone with a regular GeForce GPU as of 2/11/2020. When you are picking drivers, there is no option for CUDA like there is for Tesla cards. Just select game ready driver.
Also, follow Jeff's tutorial with the versions. The current 'survival guide' as Jeff calls it already has newer versions of things and if you try to use Jeff's methods but with the newer versions, you will run into errors. So stick with CUDA 10.0 and tensorflow-gpu 2.0 for now.
If you already tried with the newer stuff and are getting errors, just redo starting from the top with Jeff's tutorial, but pay very close attention to your paths. In the environment variables there will be a CUDA_PATH and CUDA_PATH_V10_2 (Or whatever your newer version is) that you need to update for CUDA 10.0.
But by change the environmnet vriables, will that solve the issue that when I check the command
nvcc --version
I get the CUDA version as 10.2
Will updating the environmnet paths and downloading cuda toolkit 10.1 downgrade the CUDA version of my gpu?
Yep, sorry and downloading compatible drivers
ua-cam.com/video/NwnnTDGgF0I/v-deo.html
Can i still play fortnite with that driver? I'm affraid I will have problems with some games..
@@iCro63 Updating your GPU drivers should not give you any issues playing your games, especially Fortnite. And especially if you're using the Nvidia Game Ready Driver for a GeForce GPU.
Thanks a lot!
i used Nvidia Geforce GTX 1650 with tf 2.2.0 and python 3.8
I used the following code to verify if my GPU is getting used:
import tensorflow as tf
if tf.test.gpu_device_name():
print(f'Default GPU Device:{format(tf.test.gpu_device_name())}')
else:
print("Please install GPU version of TF")
It prints out : Default GPU Device:/device:GPU:0
Conclusions: It works!
This deserves a Nobel Peace Prize
Really great Video. Got tensorflow GPU on windows. Also, I used your guide to install Tensoflow on Ubuntu, it worked as well. Thank you for this amazing tutorial.
I have to thank you for the support!!! This video help me to install tensorflow with no problems.
This worked like charm and capacitated my deep learning experiments in a big way. Make sure you install the "right versions" and not the "latest version" as Prof often cautions in the video.
On my day 4, i've tried installing this more than 5 times and failed. It only took once with your instructions, thank you so much!
did you follow the exact version that jeff used?
@@toonepali9814 yes
Thanks for this one. Managed to get this to work first time, having struggled for days with other methods. "GPU is available" was music to my ears. I have struggled for several days with other guides but this one worked. Thanks for the precise guide.😁👏
Thank you so much, this was a tremendous help. I am currently doing my senior research project and I just kept finding 1-2 year old tutorials online/in books. Worked (almost) effortlessly, thanks again!
I have installed every single application watching your videos and it never never fails .... thank you so so much
How good is this video! I spent 3 nights trying to install tensorflow for gpu, reinstalled windows and everything but finally this video did the trick. Thanks so much!
Just letting everyone know, if they are doing this installation for the GTX 20 series or Titan series, there is no drop menu for the CUDA version when you are on there website installing the driver. You instead have to go to the additional information tab for your particular GPU and look at the Release notes. Ctrl+F and type in CUDA, to see what version of CUDA is being packaged with that update. For me, I had to download the older update (Version 431.86) in order for the CUDA versions to align with the one recommended for Tensorflow.
Thank you for this comment, I was wondering about this
On the tesorflow website there is a separate link for CUDA and GPU driver installs.
Jeff, Thank you for your great tutorial!! Want to let you and your viewers know that your instructions worked on my Windows 10 Ryzen 7 system with a Gigabyte RTX 2070 Super GPU. Much appreciated.
did you install or update the driver of RTX 2070? I just wanted to install the driver but i don't have any option to choose the CUDA toolkit version
@@shahabeinabadi6009 you figure this out?, struggling to find it myself
Thanks for the comprehensive guide. I was able to install my GTX 1660 Ti on windows 10 and Anaconda . My only difficulty was to read some of your instructions on my low resolution screen. if you could zoom on the important parts of the screen it would make our lives a lot easier.
You, Sir, are truly awesome. Followed this as is and no problems. I'm going to be recommending this to whoever I know working with tensorflow gpu
Thank you sir. This is the most detailed video. I have been trying to setup TensorFlow environment for a week and found your video luckily. Thanks a lot for making this video. I can start learning finally
Awesome video. Thank you for walking through this step by step. I always am afraid I will check, or not check, a box and end up in error city. So I truly appreciate how thorough your video, as well as your other videos, is. Absolutely fantastic! Also, if any of you are like me and want to test the performance of tensorflow's model fitting between the GPU and CPU, you can use the following line of code
with tf.device("/cpu:0"):
# this will specifically use the cpu instead of the gpu. tf is from the line: import tensorflow as tf
model.fit(x=X_train, y=y_train, epochs=600, validation_data=(X_test, y_test), callbacks=[early_stop]) # this is an example where model is from tensorflow.keras.models
Jeff, once again, you are the best resource for getting things done.
I would have spent weeks trying to figure this all out.
Followed your instructions and everything worked.
Thank you!
That was a great and latest tutorial. Everything went great. Thank you so much!
is it possible for us to run pythoncodes using gpu but without gpu, am stuck can you help
can you mention tensorflow gpu version , cuDNN and CUDA version
Thanks for your great video. I had a lot of problems when I last tried to install Cuda. With this video, I have no probelm.
That was a great and latest tutorial. Everything went great for me with Geforce GTX 1050 and Tensor Flow Version: 2.1.0. Thank you so much!
Jeff, Thank You ! for this wonderful video. I followed every step you suggested and had no problems installing Tensorflow on my new laptop with Geforce rtx 2070.
This was an awesome walk through, thank you for sharing this! I went through the described process AFTER I had installed Anaconda, so using Anaconda's prompt was the only difference. Besides that, everything, and I mean everything, went smoothly. Thanks again!!
Did you happen to try out your installation with Tensorflows object detection api afterwards?
@@fareselamine8115 No I didn't. I just followed this tutorial.
Great step by step tutorial Jeff! Probably the easiest guide that I had to follow after my previous set up decided to crap itself after a couple of model training experiments..
Definitely earned a new subscriber! :)
Glad it helped! And thanks for the subscribe!
thank you for the full and detailed tutorial, I can now detect my GPU ^^
Thank you Jeff, for creating such a comprehensive and detailed tutorial.
Awesome guide, Remembered doing this a while back for an old machine and was dreading the process but this worked flawlessly. Will definitely be checking out some of your other videos to learn more from you!
Hey Jeff - Yes - was struggling a lot to install tensorflow-gpu although already had the cpu one - this was easy with your tutorial
Thank you so much
For everyone who are having troubles with keras, try to put "tensorflow." to every code starting with "keras"
ex:
from keras import datasets -->
from tensorflow.keras import datasets
from .keras.datasets import mnist --->from tensorflow.keras.datasets import mnist
Sorry by my english I'm not a native speaker.
Jeff, you are my god now. Thank you so much. You not only show me the process, you teached me how and why.
You covered everything, start to finish, no issues! Really appreciate it. Subscribed!
Excellent work. Thanks! Managed with no errors from start to finish. Using a dated GeForce GTX 960 4GB, yet no issues. What I missed: where did Keras get installed? It's not in the .yml installation script.
Thank you very much for this. I was able to get everything running on the first time with my new AI rig. I appropriate your time, thoroughness, and thoughtfulness!
Thank you so much, I can't imagine how much it would take to install tensorflow without this video. Subscribed :)
Thank you so much man. There was no problem with the installation whatsoever.
Simply awesome.. I am able to setup in 1st attempt.. i have been trying this for a month :-)
Thank you so much for your work, I was running to all sorts of errors before I watched your video.
Thank you so much!!! It is the first time that i follow a YT without having to look up for other resources. Good job! keep it up
I have tried to get tensorflow-gpu setup working for many times now. This is the first time I succeeded. I only came here for installation but I may have to take a look on the course. It must be amazing....
Oh BTW! If Cuda toolkit-installation fails and every solution you find using Google fails too. If you bang your head against brickwall for two hours like I did then try installing cuda toolkit using "conda install -c anaconda cudatoolkit=10.1"
Many thanks for your gift. Thanks for dedicating your time and saving our time.
I wish you all the bests...
Your tutorials are great! Thank you a lot. Helped me in the past and now helped again (with more recent versions).
All Good, so far when I installed and imported Keras it again created a new dimension for the rubrics cube kind of puzzle for the versions to align . Please include Keras also
Jeff you forgot to tell us to press a key after giving conda create env, I was waiting for something to happen for 10 minutes. lol anyways got it successfully installed thanks Jeff
You are a good man. Thank you very very much for this video. Everything worked as you said. You just saved my Master's project!
This is a great tutorial!
I just doubt whether the NVIDIA drivers would work. Since I don't get the options for selecting the CUDA toolkit.
Anyways, great tutorial!
Edit: No problem, it works fine. Thank you so so much for helping me out!
Went very well without any issues , thanks alot sir . Keep posting videos and it would be great if we've GAN's project . I've seen one still would like to have more on it
OMG! This is the most perfect video to use TensorFlow GPU. Thank u for this.
It just works on the first attempt!!!..... Thank you prof. Jeff
29:53 that made me laugh much more than it should have, thank you for your work, i'm learning fast in part thanks to you !
Thank you so much. This worked perfectly!
Having not watched one of your videos for a while (I've been following you since the days of Encog for .net) I must say your presentational skills have vastly improved. I like the little jokes you put in "Don't sell my email address to spammers" made me laugh. The content is super useful as always.
I wish there had been a guide like this last time I tried to set this up about 3 years ago. You also mentioned some great tips (Picking the latest is bad... again I wish I'd known that 3 years ago!).
Thank you for sharing your experience with the community, please keep up the great work.
Thanks!!! Finally I can use my gpu for computing!!
I literally used your directions for Linux except install for miniconda and Nvidia drivers/Software:)
The first minute of the video is so true. Looking forward for this tutorial!
Thanks a lot! This saved a lot of time. BTW Your GitHub repository has got everything a beginner like me needs, again thanks for all the material.
Please modify title to specify CUDA. Currently it implies generic GPU (OpenCL/SYCL/Onyx/HIP/CUDA).
Thanks for specifying this in the video 2:49 for anyone else that could be confused.
That is a great suggestion/point. Done.
Thank you so much. This was the best tutorial out there on UA-cam. Everything went well! Thank you!
You should also say Win10 Home edition doesn't permit TF-GPU. Only Win10 Pro. Great tutorial!
It was great.Thank you very much. It will be so great if we will have U-Net demo too
I not done your video yet but pretty clear explanation thx.
Jeff, thank you for this tutorial. Phenomenal! It worked for me with no errors! Would you be able to create a tutorial for Linux users? I have this running on my laptop, but have more GPU juice on my Linux machine running Ubuntu 20. Thanks again!
Muchas gracias por este gran vídeo, me funcionó a la perfección!!
That was really helpful thank you. For me, this worked without any problems. The only thing that was different for me is that I could not choose any CUDA Version on the Nvida Driver download page. I got a Quadro P3000 in my Laptop and the option to select any CUDA Version was just not there. Other than that I stuck to the survival guide and the Notebook at the end tells me that GPU is available. Now I just need to look up your other videos to figure out how the learning works in python as I am quite new to this.
PROBLEM : I am getting TensorFlow version 1.15.2 and GPU is not available
This was a great video, watch every single minute!
Thank you so much. Time to learn tensorflow!
As always, this was great. Thank you.
Thank you so much I can't believe it worked!
using "conda env create -f tensorflow-gpu.yml" instead of "conda env create -v -f tensorflow-gpu.yml" worked for me just in case someone else is stuck.
Thanks!
Thank u so much sir it works for me after spending 1 day
For GeForce 16 series, the latest driver works just fine with toolkit 10.1 and cuDNN. It is the same driver used for gaming so need to switch. Thank you for the video Jeff
Jeff, sos mi ídolo. Muchas gracias maestro!
Glad it was helpful.
It really worked , thanks a lot sir.
Very helpful and knowledgable, Thank you!!
oh god, this video saved my life.
Thanks a lot Mr Heaton, helped me very much.
Very informative, great tutor, keep it up! Cheers
hi jeff, thank you so much, i only had one issue, when i did the last test this happened.
GPU is NOT AVAILABLE
why ? how can i make it work ?
and again thank you.
PD: mine is a GTX1050 (notebook)
I am having the same issue (also using a GTX 1050). Have you found a solution that worked for you?
you can't install Tensorflow on GTX1050, it's too old for this technology!
Thx for taking the time and making this video, I followed everything step by step but when I test it, it says "GPU not available".Any recommendation?
I'm also getting same
same error, did you fix it ?
saved my day, thanks a lot for your time and effort
Thank you Sir , You saved my day , Appreciate your effort :)
Thank you sir...Very useful
Thank you Dr. Heaton. This has been really helpful!
Thank you so much! you save my time!!!
It has been really useful for me...I can say you have saved my life! THANK YOU
I have a question. I get this message in the promt: Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2.
I have checked github and it says you shoulidn't bother if you work with a GPU (i use a laptop with a Geforce RTX 2070). In other answers it says that if you fix it the machine performace improves...what you dou think? Any recommendation? Thanks in advance
Best tutorial so far thumbs up.
thank you for this great tutorial, keep up the good work
Thank you man for explaning this, best regards!!!
is it possible for us to run pythoncodes using gpu but without gpu, am stuck can you help
Thank you! This has been very helpful. Also, I am using Spyder as my IDE to build CNNs and RNNs - are tensorflow and keras still going to run on my GPU right?