Ubuntu16.04解决报错:Failed to get convolution algorithm

这个问题着实坑了我好久,网上很多方法都说tensorflow需要降低版本,或者说是cuda、cudnn版本不匹配,需要重新安装

我感觉可能有一些问题确实是用这样的方法能够解决,但是如果解决不了还需要具体情况具体分析

仔细研究报错信息之后,我在终端发现了这样一个提示信息

could not create cudnn handle:CUDNN_STATUS_INTERNAL_ERROR

其实这才是真正的问题所在

在运行的代码中添加如下语句即可解决:

from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession

config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
发布了80 篇原创文章 · 获赞 184 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/hesongzefairy/article/details/105343581
今日推荐