tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found. (0) Unknown: 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. [[{{no
摘要由CSDN通过智能技术生成
一、报错内容
tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
(0) Unknown: 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.
[[{
{node conv2d_24/convolution}}]]
(1) Unknown: 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.
[[{
{node conv2d_24/convolution}}]]
[[conv2d_46/truediv/_417]]
0 successful operations.
0 derived errors ignored.
二、解决方案
import keras
import tensorflow as tf
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"#因为是单GPU训练,所以需要加上这一行代码
config = tf.ConfigProto()#t配置tf.Session的运算方式
config.gpu_options.allow_growth = True # TensorFlow按需分配显存
config.gpu_options.pe
tensorflow-gpu报错:tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found
tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found. (0) Unknown: 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. [[{{no