在我的Colab托管运行时中无法使用tensorflow.keras.layers.CuDNNLSTM或keras.layers.CuDNNLSTM

时间:2019-06-15 05:10:14

标签: tensorflow keras google-colaboratory

当我尝试使用tensorflow.keras.layers.CuDNNLSTM或keras.layers.CuDNNLSTM时,出现以下错误:

InvalidArgumentError: No OpKernel was registered to support Op 'CudnnRNN' used by {{node cu_dnnlstm/CudnnRNN}}with these attrs: [dropout=0, seed=0, T=DT_FLOAT, input_mode="linear_input", direction="unidirectional", rnn_mode="lstm", is_training=true, seed2=0]
Registered devices: [CPU, XLA_CPU]

我正在使用托管的运行时,并且我想也支持GPU,但我注意到上面的错误消息表明没有GPU。不太清楚问题出在哪里,但是任何线索都会被感激

1 个答案:

答案 0 :(得分:0)

您需要明确请求启用GPU的运行时。

从“运行时”菜单中选择“更改运行时类型”,然后在“硬件加速器”下选择GPU:

enter image description here

相关问题