I want to share the procedure to work with your GPU with the new stable version of tensorflow 2.5 in case someone is having problems with the update.
I have noticed an improvement in training time.
According to official information
Install Anaconda with Python 3.9
Install the latest version of your GPU driver.
Install Cuda Toolkit 11.2.2
Download Cudnn 8.1.1
Now just copy the files inside from each Cudnn folder and paste into your Cuda folder, follow this example.
A. Copy \cuda\bin\cudnn*.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin.
B. Copy \cuda\include\cudnn*.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include.
C. Copy \cuda\lib\x64\cudnn*.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\lib\x64.
Go to your environment variables, Under “System Variables” click on “New” and create the CUDA PATH
Create a new conda environment
conda create --name TF-2.5 python=3.9
conda activate TF-2.5
install tensorflow and libraries
pip install tensorflow
pip install tensorflow-datasets
pip install tensorflow-hub
pip install jupyter
pip install numpy
pip install matplotlib
pip install pandas
if you need to use jupyter notebook with the new version of python and tensorflow (very important)
conda install -c conda-forge ipykernel
Register your environment
python -m ipykernel install --user --name TF-2.5 --display-name “Python 3.9 (Tensorflow 2.5)”
Testing your environment
that’s all works completely fine for me.
Thanks for sharing, Ricardo. Just to confirm, is this
Windows 10 21H1 or another version of Windows?
Hi Yarri, Your welcome! yes it’s that version.
May 28, 2021, 5:21pm
from what folder conda should be run ?
When I run it from the default folder of cmd, error happens:
C:\WINDOWS\system32>conda create --name TF-2.5 python=3.9
‘conda’ is not recognized as an internal or external command,
operable program or batch file.
Thanks in advance.
Hi Sasha, Because you have to create the environment from the Anaconda Prompt (miniconda3) not from cmd.
May 28, 2021, 7:17pm
Thank you very much, Ricardo.
What application corresponds to the Anaconda Prompt ?
I could not find it in the folders seemed relevant:
May 29, 2021, 11:40am
Thanks a lot, Ricardo. Now it works perfectly!
I cant use my GPU with tensorflow 2.4.0!
I have CUDA 11.0 with 8.0.4 compatible for cuda 11,
all works in python with interpreter (Conda python 3.7.6 with virtual env)
When process image it’s too slow! The GPU isn’t used… why??? What’s wrong? I lost 4 days to find the error… but all .DLL are loaded successfully, i can’t see any error
I show you my screenshot…
https ibb co /LpHtMwf (complete this link to view i can max put 2 link in this post)
September 24, 2021, 8:11pm
This procedure works good with Tensorflow 2.6 just keep following the instructions.
Hi Ricardo . I followed the steps but it tells me that I don’t have a graphics card and I have an rtx 3060.
Python_version 3.9.16 (main, Jan 11 2023, 16:16:36) [MSC v.1916 64 bit (AMD64)]
Tensorflow GPU version: 2.11.0
Keras version: 2.11.0
Hub version: 0.12.0
TF Datasets version: 4.8.2
GPUs Available: 0
According to the
current installation guide, TensorFlow support for GPUs under Windows ended with version 2.10. I’ve been able to use get around it by running my TensorFlow environment from a Docker image based on