在使用RTX 2060 开发TensorFlow 1x 版本遇到一个错误,如下:
2020-07-20 22:08:55.555961: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329]
Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
2020-07-20 22:08:55.571109: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329]
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)