Keras compatibility with Nvidia RTX 30xx and 40xx


I just bought a 30xx Series gpu and found out the hard way, that the Keras nodes are not compatible. Is there anything planned to support newer Keras versions, that support newer gpus?


1 Like

Btw, if anyone is about to suggest this thread:

I tried, but could not get get it to run (probably my lack of skills). If anyone has a good tutorial on how to install the nvidia version of tenssorflow on a win 10 machine with anaconda, please let me know.

1 Like

+1 from me

the workaround only works on Ubuntu as far as I have seen, or am I wrong?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

With the tensorflow-directml package from tensorflow-directml you can use the Keras nodes with GPU acceleration even on a newer RTX30/40, AMD or Intel GPU. Not as fast as native Tensorflow 2 on CUDA but significantly faster than CPU.

1 Like

Sorry, wrong link. This is the right one: Tensorflow DirectML

1 Like

Thanks, it’s working on RTX40.

Expounding on the solution below by @1N4148 , I was able to get my RTX 40xx to work for Keras DL. Knime version 4.7.7 using the steps below:

  1. Created a New Keras GPU Environment.
  2. Opened the Keras GPU environment from #1 on a command line.
  3. Updated tensorflow to version 1.15 using command:
    pip install tensorflow==1.15 --ignore-installed
  4. Installed tensorflow-directml using command:
    pip install tensorflow-directml
  5. Tested that package runs correctly in Python session as described in TensorFlow with DirectML on Windows | Microsoft Learn
  6. Run the GPU environment in KNIME using test workflow (Image_Classification_MNIST_Solution).
  7. Used to hang and error out before I updated. Works well now.
1 Like

Meanwhile I found also a tensorflow 1.15.4 for Windows compiled against CUDA 11.1:
Tensorflow 1.15.4 CUDA 11.1 cuDNN 8

Works also very well and gives a huge speed boost with the cuDNN LSTM/GRU layers.

Requires Python 3.8, Numpy 1.18.5, Protobuf 3.20.3 and Pandas 1.3.5

1 Like