Tensorflow-gpu导入失败:Process finished with exit code -1073741819 (0xC0000005)

笔记本一段时间没用Tensorflow,再用jupyter notebook打开时,出现kernel dieded现象,长时间[*]

Tensorflow-gpu导入失败:Process finished with exit code -1073741819 (0xC0000005)_第1张图片

1、Jupyter notebook出现kernel连接失败(勿踩坑:更新Anaconda)

结合上次spyder出现kernel died问题,以及一些经验贴说是TF或Anaconda的版本问题,conda upgrade notebook或者更新Tensorflow版本就行,最开始走进了“更新notebook”的大坑

再次更新notebook真的各种坑都出来了,然后Tensorflow换了版本也不行(注意TF1.14版本(>1.13)对应cuda10,本机装的cuda9,所以安装pip install tensorflow-gpu==1.12.0)

最终折腾到最后,重新回到了起点~~~

2、pycharm报错:Process finished with exit code -1073741819 (0xC0000005)

意识到不是Anaconda的问题,打开Pycharm,写一段是否开启Tensorflow-gpu的测试程序

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()

执行,凉凉:Process finished with exit code -1073741819 (0xC0000005)

3、解决办法

将h5py包升级到2.9.0版本

Tensorflow-gpu导入失败:Process finished with exit code -1073741819 (0xC0000005)_第2张图片

成功打印显卡信息

Tensorflow-gpu导入失败:Process finished with exit code -1073741819 (0xC0000005)_第3张图片

Jupyter Notebook也不搞kernel dieded 了,这锅Anaconda不背。

 

 

你可能感兴趣的:(深度学习实战)