1.报错
Internal: Blas SGEMM launch failed
2.思路&解决方案
思路:
查了各种博客是GPU和cuDNN的问题
大部分解决方案是重启kernel,重新安装cuDNN,安装cuDNN补丁等等
但是对我来说,都没用
最终解决方案:
在运行文件上面加上这一段
#防止cuDNN报错:方案2
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
# Currently, memory growth needs to be the same across GPUs
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
# Memory growth must be set before GPUs have been initialized
print(e)