使用inception-V3批处理文件retrain.bat进行预训练时,发现报错“Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try…”于是打开retrain.py文件,在前面加上如下代码:
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
在cd到retrain.bat文件,成功运行。
参考文章:https://blog.csdn.net/qq_41868689/article/details/98503069