Installing Tensorflow-GPU and Keras for R (and Python) on Windows in 2024

preview_player
Показать описание
Installation & Hardware Guide for running Deep Neural Networks (DNNs) in R on Windows with graphics card acceleration

# Packages that play ball in 2024 with NVIDIA graphics card acceleration on Windows:
Anaconda 2022.10 + Python 3.9.13 + Tensorflow 2.10.1 + cuDNN 8.1.0 + CUDAtoolkit 11.2 + R 4.3.3 + Keras(R) 2.13

# Installation code for Anaconda3 Prompt to install Tensorflow, cuDNN and CUDAtoolkit:
pip install "tensorflow=2.10.1" ... or use "smaller than" 2.11. Youtube does not allow this symbol here.
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0

# Install Keras in R required only once:

# Use Anaconda3 environment from R, needs to be called every time before running a DNN:
library(keras)
use_condaenv("base", required=T)

# Check if graphics card (GPU) is detected:
library(tensorflow)
tf$python$client$device_lib$list_local_devices()

# Troubleshooting:
tf_config() # Check if Python 3.9 or 3.10? Tensorflow 2.10?
system("nvidia-smi") # Check if graphics card driver up to date?
Рекомендации по теме
Комментарии
Автор

Ok, my gpu feel the heat of the night. 3 weeks, 21 nights for read every post on GitHub, Stackoverflow, Medium. I can’t imagine. You are like god but in better because you know how to do deep learning with R, on gpu.

Great thanks,
Best regards,

Casual R user from France

xtremmoise
Автор

Thanks for helping me with this shit 🎉 my master thesis will profit from the additional performance boost. Kind greetings from Germany. (Edit: the same versions are working with R 4.4 and Python 3.11.9, version >3.11 is not supported by tensorflow 2.10.1)

Bulldogge
Автор

THANK YOU SO MUCH I HAD TO FOUGHT FOR WEEKS WITH SHIT TUTO YOU ARE THE BEST THANK YOU

smtxda
Автор

Thank you, this really help me, a lot!

tmhanis
Автор

Bro you saved my ass, thank you very much

bubelayyy
join shbcf.ru