CuDNNLSTM: UnknownError: Fail to find the dnn implementation

后端 未结 6 602
感情败类
感情败类 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条回答
  •  一个人的身影
    2021-01-02 04:50

    If you're getting this error while fitting Keras NN put this code on your import

    from keras.backend.tensorflow_backend import set_session
    import tensorflow as tf
    config = tf.ConfigProto()
    config.gpu_options.allow_growth = True
    sess = tf.Session(config=config)
    set_session(sess)
    

    credit

提交回复
热议问题