赞
踩
完整错误:
tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [Op:Conv2D]
使用背景:
**
**
解决方案
在代码前加这一段,具体原理模棱两可,无非就是改变了显卡内存的分配
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。