I am a biologist and not a programmer/software developer. I read the book "Deep Learning with R (second Edition)" and try to develop a keras model.
I bought a new fancy computer with a NVIDIA RTX 4070 and Windows 11. I have tried for days to find an "easy" solution to run in R keras and tensorflow on my GPU. Apparently tensorflow > 2.10 is not supporting GPU on native Windows? Apparently there is no (easy) solution to this. I installed CUDA and Cudnn, also Anaconda and VisualStudio and C++ compiler.
I am aware, that you have to check for the correct versions of CUDA and cudnn (which I did for the newest tensorflow version before I realised that this doesn't support Windows anymore, however that seems unnecessary anyway when the newest tensorflow versions don't support Windows?
I was able work tensorflow on GPU when using python, but not in my RStudio environment.
I tried following tutorials:
Tensorflow Install Guide 'tensorflow/install/gpu_plugins'
Using RStudio Server in Windows WSL2 – Posit Support
libraries - How to solve library dependancy for Rstudio in Ubuntu 22.04 - Ask Ubuntu 'askubuntu/questions/1404233'
DirectML Plugin for TensorFlow 2 | Microsoft Learn
Most of them are not suitable for RStudio or just don't work, as links are outdated. Furthermore, it seems that RStudio Server is not provided for Ubuntu, I get for example these errors:
'libraries - How to solve library dependancy for Rstudio in Ubuntu 22.04 - Ask Ubuntu' : 'askubuntu/questions/1404233
'python - ImportError: libGL.so.1: cannot open shared object file: No such file or directory - Stack Overflow' : 'stackoverflow/questions/55313610
It seems to me, the easiest solution would be to install an older version of tensorflow in RStudio. However, the oldest version is 2.12 or something, the install_tensorflow() function wouldn't let me install anything older than that.
Google Search, Stackoverflow and youtube, no results. There are some similar questions on StackOverflow and here on PositCommunity, but they seemed not to be answered or relate to older versions e.g. Windows 10, tensorflow 1.xx etc.
Machine learning is on the rise, and Windows is the most used OS worldwide. How can it be, that there is no support at all? Overall, I think RStudio is doing great for their IDE and linking python and R. But for this special case, it seems redicilously complicated.
So my question(s): How do I set up Tensorflow and Keras for Windows and RStudio so it uses the GPU? Any tutorial (for dummies)? And why is it so overlyc complicated/not supported?
Many thanks for all your answers, maybe some other non-developers may find this helpful, and there might be more support for the future?