tensorflow bug: Process finished with exit code -1073740791 (0xC0000409)
来源:互联网 发布:用python写网络爬虫 书 编辑:程序博客网 时间:2024/06/14 12:57
____tz_zs
报错场景:
我是在训练神经网络模型,同时运行检测的会话检测其正确率时报错(ps:在cpu版本的tensorflow上不会报错)
Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 965M, pci bus id: 0000:01:00.0)could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZEDerror retrieving driver version: Unimplemented: kernel reported driver version not implemented on Windowscould not destroy cudnn handle: CUDNN_STATUS_BAD_PARAMCheck failed: stream->parent()->GetConvolveAlgorithms(&algorithms) Process finished with exit code -1073740791 (0xC0000409)
报错原因(这是我的理解,不一定正确):
由以上报错信息可知,程序是在创建gpu线程时报错,而程序的进程结束代码 exit code -1073740791 (0xC0000409) 所以我推测与堆栈溢出相关。(Windows NTSTATUS Values 进程终止消息标识符:http://blog.csdn.net/tz_zs/article/details/77427842 )
gpu已经被训练神经网络的会话占用了,运行监测会话时,没有gpu内存给他去运行。
解决方法:
方法1:
为会话按比例分配gpu(设置每个GPU应该拿出多少容量给进程使用)
config = tf.ConfigProto()config.gpu_options.per_process_gpu_memory_fraction = 0.2with tf.Session(config=config) as sess: .......
另外,分配时需注意,检测神经网络准确率的数据集是同时(而不是像训练时是分batch的)放入神经网络模型中运行的,要消耗大量资源。所以要分配多一些,不然会内存溢出。
方法2:
让其自动的分配(刚一开始分配少量的GPU容量,然后按需慢慢的增加,由于不会释放内存,所以会导致碎片)
config = tf.ConfigProto() config.gpu_options.allow_growth = True with tf.Session(config=config) as sess: .......
查阅的资料:
http://wiki.jikexueyuan.com/project/tensorflow-zh/how_tos/using_gpu.html
https://www.zhihu.com/question/52253560
http://blog.csdn.net/u012436149/article/details/53837651
写博客时的注意:
从草稿箱删除不要的草稿文章时,注意先刷新草稿箱。
我是在草稿箱的一个版本上编辑然后发表文章,由于没有刷新草稿箱页面,就直接把草稿箱的文章全删除了,导致已经发表的文章也被删除
( ̄ε(# ̄) Σ
- tensorflow bug: Process finished with exit code -1073740791 (0xC0000409)
- pyCharm Process finished with exit code -1073740791 (0xC0000409)
- finished with exit code -1073740791 (0xC0000409)
- exit with code 1073740791(0xc0000409)
- android Process finished with exit code 0
- bug宝典node篇 nodejs Process finished with exit code 0
- cordova Process finished with exit code -1
- process finished with exit code 52
- 运行tensorflow的例子,出现Process finished with exit code 3问题
- python 使用requests时提示Process finished with exit code -1073741819 (0xC0000005)
- Python 运行出现Process finished with exit code -1073741515 (0xC0000135)错误
- python 中文字符报错Process finished with exit code 0
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- Android Studio各种坑爹之:finished with non-zero exit value 1和Return code 1 for dex process.
- puppet kick forbidden finished with exit code 2
- exit with code 1073740791
- exit with code 1073740791
- Process 'command 'G:\android-sdk-windows\build-tools\20.0.0\aapt.exe'' finished with non-zero exit v
- HBase简介
- 机器学习中的相似度度量
- android获取设备信息
- CSDN日报20170818——《给最真的自己加上static final》
- 基于维纳滤波的图像复原算法
- tensorflow bug: Process finished with exit code -1073740791 (0xC0000409)
- Springboot项目pring-boot-devtools 热加载
- 大小写互换
- shell下控制命令执行超时自动终止
- hashtable基础
- 循环链表--约瑟夫环问题
- updater-script
-  |"|&|<|>等html字符转义
- CCF 送货