当前位置: 代码迷 >> 综合 >> tensorflow出现 this is probably because cuDNN failed to initialize, so try looking to see if a……问题
  详细解决方案

tensorflow出现 this is probably because cuDNN failed to initialize, so try looking to see if a……问题

热度:96   发布时间:2023-11-17 00:25:11.0

报错信息
UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.

我的配置
tensorflow1.12
GTX1060
CUDA 10.0
cudnn 7.6.4

方法一:可靠粗暴
将tensorflow1.12替换为tensorflow1.8.0或者1.9.0
而且不能使用conda命令安装

pip install tensorflow-gpu==1.8.0

方法二:简单有效
建立Session时,将代码修改为

  config = tf.ConfigProto()config.gpu_options.allow_growth = Truesess = tf.Session(config=config)

最好用方法二吧,毕竟现在tf2.0都出来了,降低版本不能长久~

  相关解决方案