CuDNNLSTM: UnknownError: Fail to find the dnn implementation

后端 未结 6 599
感情败类
感情败类 2021-01-02 03:55

I have run the model with LSTM as the first layer successfully. But out of curiosity, I replace LSTM with CuDNNLSTM. But after model.fit, it replied the following error mess

6条回答
  •  萌比男神i
    2021-01-02 04:30

    For TensorFlow v2, one solution would be -

    import tensorflow as tf
    physical_devices = tf.config.list_physical_devices('GPU')
    tf.config.experimental.set_memory_growth(physical_devices[0], enable=True)
    

    Then you can use keras model too -

    from tensorflow.keras.models import Model
    

    Documentation

    This solution worked for me, it enables memory growth for only one GPU.

提交回复
热议问题