tensorflow-gpu报错:E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
执行文档中加入下列代码: from tensorflow.compat.v1 import ConfigProto
config = tf.ConfigProto(gpu_options=tf.GPUOptions(allow_growth=True)) sess = tf.Session(config=config)
或者是: from tensorflow.compat.v1 import ConfigProto from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto() config.gpu_options.allow_growth = True session = InteractiveSession(config=config)
参考:https://blog.csdn.net/weixin_44493424/article/details/88179066 https://blog.csdn.net/tangxianyu/article/details/80537942