TensorFlow:Failed to get convolution algorithm. This is probably because cuDNN failed to initialize.

问题描述

运行TensorFlow程序后显示错误:
Failed to get convolution algorithm. This is probably because cuDNN failed to initialize.
(无法获取卷积算法,可能是因为cuDNN初始化失败)
在这里插入图片描述

解决方案

这个问题并不是因为cuDNN的安装有错误,而是因为你的显卡大小有限,参数太多,所以显卡被撑爆了。
加上以下两行代码即可:
import os
os.environ[‘CUDA_VISIBLE_DEVICES’] = ‘/gpu:0’

猜你喜欢

转载自blog.csdn.net/Nire_Yeyu/article/details/105141156
今日推荐