Tensorflow调试经验---“Failed to get convolution algorithm. This is probably because cuDNN failed to ini”
2021/6/29 6:24:10
本文主要是介绍Tensorflow调试经验---“Failed to get convolution algorithm. This is probably because cuDNN failed to ini”,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
今天使用tensorflow2.0出现faile,我笔记本是Y7000p,显卡是2060显存就有6G所以在使用的时候出现问题:
Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
解决方案:
#tensorflow1.X版本 from tensorflow.compat.v1 import ConfigProto from tensorflow.compat.v1 import InteractiveSession #方法一:限制GPU使用率 config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.85 #占用85%显存 session = tf.Session(config=config) #方法二:对GPU按需分配 config = ConfigProto() config.gpu_options.allow_growth = True session = InteractiveSession(config=config)
使用keras出现这个报错的时候可以:
import tensorflow as tf import keras config = tf.compat.v1.ConfigProto(allow_soft_placement=True) config.gpu_options.per_process_gpu_memory_fraction = 0.3 tf.compat.v1.keras.backend.set_session(tf.compat.v1.Session(config=config))
这篇关于Tensorflow调试经验---“Failed to get convolution algorithm. This is probably because cuDNN failed to ini”的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-10-30tensorflow是什么-icode9专业技术文章分享
- 2024-10-15成功地使用本地的 NVIDIA GPU 运行 PyTorch 或 TensorFlow
- 2024-01-23供应链投毒预警 | 恶意Py包仿冒tensorflow AI框架实施后门投毒攻击
- 2024-01-19attributeerror: module 'tensorflow' has no attribute 'placeholder'
- 2024-01-19module 'tensorflow.compat.v2' has no attribute 'internal'
- 2023-07-17【2023年】第33天 Neural Networks and Deep Learning with TensorFlow
- 2023-07-10【2023年】第32天 Boosted Trees with TensorFlow 2.0(随机森林)
- 2023-07-09【2023年】第31天 Logistic Regression with TensorFlow 2.0(用TensorFlow进行逻辑回归)
- 2023-07-01【2023年】第30天 Supervised Learning with TensorFlow 2(用TensorFlow进行监督学习 2)
- 2023-06-18【2023年】第29天 Supervised Learning with TensorFlow 1(用TensorFlow进行监督学习 1)