Install TensorFlow GPU and PyTorch with CUDA on Windows 10 Anaconda | CUDA 10.1 cuDNN 7.6

preview_player
Показать описание
How to install TensorFlow GPU and PyTorch GPU for Anaconda on Windows 10 with CUDA and cuDNN configuration. Using Anaconda is a convenient way to install TensorFlow GPU or PyTorch on Windows platform. I am using Python 3.8 in this tutorial. In the end, we will verify whether TensorFlow and PyTorch are able to detect the GPU. Note that if TensorFlow is able to detect the GPU, Keras will also be able to use that GPU without any further configurations.

---------------------------------------------
► Time Stamps:
Introduction: (0:00)
Install Python on Windows 10: (0:12)
Install CUDA and cuDNN on Windows 10: (0:33)
Install TensorFlow GPU Windows 10: (2:30)
Install PyTorch GPU Windows 10: (2:50)
How to check if TensorFlow is using GPU: (3:15)
How to check if PyTorch is using GPU: (3:43)

#tensorflow
#torch
#TheCodingBug
---------------------------------------------
► Commands:
pip install --upgrade tensorflow-gpu==2.3.0
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

---------------------------------------------
► Links:

---------------------------------------------
► My Other Tutorials:
---------------------------------------------
---------------------------------------------
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you!
Рекомендации по теме
Комментарии
Автор

OpenCV 4.4.0 with GPU Support:

YOLOv4 with Darknet on Windows:

YOLOv3 YOLOv4 with OpenCV:

YOLOv4 Darknet:

YOLOv4 Custom Detector:

YOLOv4 TensorFlow and TFLite:

TheCodingBug
Автор

Nice tutorial. I have an additional question. In case I want to install Pytorch with CUDA but not on root (base) enviroment, how can i redirect the command promt to a specific enviroment?

burningwings
Автор

Dear TheCodeBug, I tested tensorflow with GPU. It works with cuda and the result is ok.
but pytorch though installed successfully, when I try
import torch
torch.cuda.gpu_device_name(0)
I get AttributeError: module 'torch.cuda' has no attribute 'gpu_device_name'
my cuda version is 10.0 and GPU is GTX1070
thanks in advance

dompower
Автор

i have intel and nvidia graphics card...but when i use tensorflow it only use intel graphics card..i have all prerequisite drivers(v456.38), cuda toolkit (v10.1)and cudnn(v7.6)...why?...

udm
Автор

Hey, there's a problem in this video. the compatible version of cuDNN with TensorFlow in windows is 7.4 not 7.6. What we see in the video is that he opens the Linux page of the Tensorflow website and therefore downloads the corresponding version. But one problem is that in the cuDNN website there is no archived file with these specifications:
cuDNN 7.4 cuda 10.1

mitramir
Автор

thanks for the tutorial man, I've finally been able to get it done without it being much of a burden to my head.

ernestoyounes
Автор

ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==2.3.0

allenchien
Автор

Thanks for your video!
Just went through the process of fresh installation of TF1/TF2 on Win10 and Ubuntu 20.04 and Ubuntu 18.04.
The thing I want to say is that you don't need to install anything except nvidia Drivers and Anaconda. Conda will do the job and get CUDA and cuDNN according to the version of TF you install. I've also tried to install PyTorch 1.6 just before writing this comment - and it worked :) Just try it yourself.

vovkaperm
Автор

How I can do the similar thing with jupyter notebook in anaconda instead of

mumtahinhabib
Автор

Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above... how do i fix this problemm

ernestoyounes
Автор

THANK you

now, can i delete the files present in my downloads folder ---files extracted from cuda.exe ???

kane
Автор

One quick question; What is this page all about?
can we install the packages with out cuda and cudnn with only pip and conda command?

mitramir
Автор

1:42 There is no need to extract .exe file 😅😂

shis
Автор

For anyone installing on Windows without Anaconda, these instructions are still great. However, make sure to modify your PATH environment variables to point to your cuda folders.

Erosis
Автор

Hi, you are my last hope, I am using OpenCV 4.4.0 with numpy 1.20.0, trying to bind tensorflow version 2.4.0 and it gives me an error (NotImplementedError: Cannot convert a symbolic Tensor to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported), but it also works fine on numpy version 1.19.2, but from this version CV2 crashes with an error (RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd). Please tell me what could be the problem?
python 3.8.5

notreg
Автор

Hi I just get this error when to verify the tensorflow can u help me with this error?
F Attempting to fetch value instead of handling error Internal: failed to get device attribute 13 for device 0: CUDA_ERROR_UNKNOWN: unknown error

muhammadhafizi
Автор

i did everything as it said in the video. Tensorflow works but with Torch i get an error when i check the gpu:
Assertionerror: Torch Not Compiled With Cuda Enabled

Dave-ldxu
Автор

Please help me, I get this error:Torch not compiled with CUDA enabled

karimbenzemi
Автор

sir installation is successfully Done but while checking not giving correct OP Errorf - Failed to load the native TensorFlow runtime.

ganeshnalegave
Автор

It is telling me to review my user what should I do??

devashishbhake