Fail to find the dnn implementation for LSTM

梦想的初衷 提交于 2021-02-17 03:27:06

问题


I'm trying to run a simple LSTM model with following code

model = tf.keras.models.Sequential()
model.add(tf.keras.layers.LSTM(32,
                                       input_shape=x_train_single.shape[-2:]))
model.add(tf.keras.layers.Dense(1))

model.compile(optimizer=tf.keras.optimizers.RMSprop(), loss='mae')

single_step_history = model.fit(train_data_single, epochs=EPOCHS,
                                        steps_per_epoch=EVALUATION_INTERVAL)

The error happened when it trying to fit the model

tensorflow.python.framework.errors_impl.UnknownError:  [_Derived_]  Fail to find the dnn implementation.
     [[{{node CudnnRNN}}]]
     [[sequential/lstm/StatefulPartitionedCall]] [Op:__inference_distributed_function_3107]

There's another error like this

2020-02-22 19:08:06.478567: W tensorflow/core/kernels/data/cache_dataset_ops.cc:820] The calling 
iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the 
dataset, the partially cached contents of the dataset will be discarded. This can happen if you have 
an input pipeline similar to `dataset.cache().take(k).repeat()`. You should use 
`dataset.take(k).cache().repeat()` instead.

I tried all methods on this question which doesn't work for me

my envrionment is

 tensorflow-gpu 2.0
 CUDA v10
 CuDNN 7.6.5 

Solution

OK.. I found that I didn't have the latest Nvidia driver, so I upgraded, and works


回答1:


Answering here for the benefit of the community even if the user has provided the solution.

Upgrading Nvidia driver to the latest has resolved the issue.

You can update NVIDIA manually from here here by selecting the product details and OS, you’re going to have to download the most recent drivers from their website. You’ll then have to run the installer and overwrite the old driver.



来源:https://stackoverflow.com/questions/60358069/fail-to-find-the-dnn-implementation-for-lstm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!