当前位置:   article > 正文

bug5-tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm_ds-math-sub-underflow

ds-math-sub-underflow

完整错误:
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]
使用背景:
**

  • win10
  • Anaconda
  • pycharm
  • cuda10.0
  • cuDNN 7.6.4
  • tensorflow-gpu 2.0

**
解决方案
在代码前加这一段,具体原理模棱两可,无非就是改变了显卡内存的分配

from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/900148
推荐阅读
相关标签
  

闽ICP备14008679号