解决TF2.3: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize

bug原因

GPU内存不足

解决方法

在代码前添加

import os
os.environ['CUDA_VISIBLE_DEVICES'] = '/device:GPU:0'

你可能感兴趣的:(解决TF2.3: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize)