在 Tensorflow/Keras 中运行来自https://github.com/pierluigiferrari/ssd_keras的代码时,使用估算器:ssd300_evaluation。我收到了这个错误。获取卷积算法失败。这可能是因为 cuDNN 初始化失败,所以尝试查看上面是否打印了警告日志消息。这与未解决的问题非常相似:Google Colab Error : Failed to get convolution algorithm.这可能是因为cuDNN未能初始化对于我正在运行的问题:蟒蛇:3.6.4。Tensorflow 版本:1.12.0。Keras 版本:2.2.4。CUDA:V10.0。cuDNN:V7.4.1.5。NVIDIA GeForce GTX 1080。我也跑了:import tensorflow as tfwith tf.device('/gpu:0'): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') c = tf.matmul(a, b)with tf.Session() as sess:print (sess.run(c))没有错误或问题。
3 回答

暮色呼如
TA贡献1853条经验 获得超9个赞
我遇到了同样的问题,因此我解决了它:
os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'
或者
physical_devices = tf.config.experimental.list_physical_devices('GPU')
if len(physical_devices) > 0:
tf.config.experimental.set_memory_growth(physical_devices[0], True)

料青山看我应如是
TA贡献1772条经验 获得超8个赞
我遇到了这个错误,我通过从我的系统中卸载所有 CUDA 和 cuDNN 版本来修复它。然后我安装了CUDA Toolkit 9.0(没有任何补丁)和cuDNN v7.4.1 for CUDA 9.0。
添加回答
举报
0/150
提交
取消