I am trying to use the CuDNNLSTM Keras cell to improve training speed for a recurrent neural network (doc here).
When I run:
from keras.layers import Bidirectional, CuDNNLSTM
I get this error:
ImportError: cannot import name 'CuDNNLSTM'
My configuration is Keras 2.0.8, python 3.5, tensorflow-gpu 1.4.0 (all managed by Anaconda) and I have both CUDA 8.0 and cudnn 6.0 installed that should be OK with the nvidia dependencies of tensorflow (here). My code setup makes Keras effectively use tensorflow backend, and every layer except the ones starting with CuDNN* work fine.
Anyone has an idea about the source of this import error ?
And for Tensorflow-2: You can just use LSTM with no activation function and it will automatically use the CuDNN version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With