本人TensorFlow-gpu 2.0 电脑显卡1650ti。
有时候电脑明明gpu没任何占用,跑深度学习代码还是会出现以下这个报错:
UnknownError: 2 root error(s) found. (0) Unknown: 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. [[{ {node conv2d_1/convolution}}]] [[Mean/_369]] (1)
Unknown: 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. [[{ {node conv2d_1/convolution}}]] 0
successful operations. 0 derived errors ignored.
首先在代码前设置gpu
import os
os.environ