这次报错与是否gpu没有关系:

TENSORFLOW 导入失败:PROCESS FINISHED WITH EXIT CODE -1073741819 (0XC0000005)

测试脚本:

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

这个异常,我的解决方法是,tf2.0一下版本,只支持cuda10.0。

重新安装cuda10.0,tf1.15.0版本,后来这个问题就解决了。

预训练下面有个:checkpoint文件,

checkpoint

model_checkpoint_path: "snap-43001"
all_model_checkpoint_paths: "snap-33501"
all_model_checkpoint_paths: "snap-35501"
all_model_checkpoint_paths: "snap-37001"
all_model_checkpoint_paths: "snap-43001"

实际上 最终模型是snap-37001

改一下checkpoint

model_checkpoint_path: "snap-37001"
all_model_checkpoint_paths: "snap-29001"
all_model_checkpoint_paths: "snap-33501"
all_model_checkpoint_paths: "snap-35501"
all_model_checkpoint_paths: "snap-37001"

ok,然后加载预训练ok!

加载预训练方法1:

tf 1.15版本以前加载预训练:

saver.restore(sess, restore_snap)

tf1.15版本:

            aaa = tf.train.latest_checkpoint(restore_snap)#saver.restore(sess, restore_snap)print("start restore------------------", restore_snap,aaa)self.saver.restore(self.sess, aaa)print("Model restored from " + restore_snap)

加载预训练方法2:

参考:https://blog.csdn.net/wjc1182511338/article/details/82111790

def build_graph():w1 = tf.Variable([1,3,10,15],name='W1',dtype=tf.float32)w2 = tf.Variable([3,4,2,18],name='W2',dtype=tf.float32)w3 = tf.placeholder(shape=[4],dtype=tf.float32,name='W3')w4 = tf.Variable([100,100,100,100],dtype=tf.float32,name='W4')add = tf.add(w1,w2,name='add')add1 = tf.add(add,w3,name='add1')return w3,add1with tf.Session() as sess:ckpt_state = tf.train.get_checkpoint_state('./temp/')if ckpt_state:w3,add1=build_graph()saver = tf.train.Saver()saver.restore(sess, ckpt_state.model_checkpoint_path)else:w3,add1=build_graph()init_op = tf.group(tf.global_variables_initializer(),tf.local_variables_initializer())sess.run(init_op)saver = tf.train.Saver()a = sess.run(add1,feed_dict={w3:[1,2,3,4]})print(a)saver.save(sess,'./temp/model')

TENSORFLOW PROCESS FINISHED WITH EXIT CODE -1073741819 (0XC0000005)相关推荐

  1. TensorFlow example示例 Process finished with exit code -1073741819 (0xC0000005)

    在做MNIST示例学习的时候,运行后一直出现Process finished with exit code -1073741819 (0xC0000005)的问题,起初以为是数据集下载的问题,所以在官 ...

  2. Windows fatal exception: access violation / Process finished with exit code -1073741819 (0xC0000005)

    解决Pycharm报错 Windows fatal exception: access violation 以及Process finished with exit code -1073741819 ...

  3. pycharm报错:Process finished with exit code -1073741819 (0xC0000005)

    问题描述: 在配置tensorflow环境时,发现在Pycharm中运行相关代码时,会出现运行结束,报错如下 Process finished with exit code -1073741819 ( ...

  4. python Process finished with exit code -1073741819 (0xC0000005) 解决

    运行程序时,Process finished with exit code -1073741819 (0xC0000005) 报错 原因:没有 python33.dll 在 c:\WINDOWS\sy ...

  5. Process finished with exit code -1073741819 (0xC0000005)

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

  6. Pycharm debug出现Qt 错误 Process finished with exit code -1073741819 (0xC0000005)

    使用pycharm debug的时候出现 This application failed to start because it could not find or load the Qt platf ...

  7. PyCharm——运行错误【Process finished with exit code -1073741819 (0xC0000005)】解决方案之一

    解决方案 以管理员身份运行PyCharm. 参考文章 pycharm报错:Process finished with exit code -1073741819 (0xC0000005)

  8. 程序异常终止:Process finished with exit code -1073741819 (0xC0000005)

    程序异常终止:Process finished with exit code -1073741819 (0xC0000005) 程序上周五下班还是可以正常运行,周一打开项目就启动不了,报出上面错误. ...

  9. 报错:Process finished with exit code -1073741819 (0xC0000005)

    解决方案: 经过一遍遍排错,最后还是关机重启解决了问题!重启pycharm不好使! 问题描述: pycharm中写好的程序,前几天还能正常运行的,突然就不能运行了,报错:Process finishe ...

最新文章

  1. asp.net 控制页面css样式
  2. 获得杰青的北大教授,竟被本科生质疑硕士毕业双非高校也能任教?网友:荒唐!...
  3. CNN 图像增强--DSLR-Quality Photos on Mobile Devices with Deep Convolutional Networks
  4. 在Asp.Net MVC中实现RequiredIf标签对Model中的属性进行验证
  5. mysql 数据索引使用_mysql数据库正确建立索引及使用
  6. matlab数组操作
  7. 打造炫酷通用的ViewPager指示器 Adapter模式适配所有 1
  8. 橙子云手机华为保修吗_华为云手机引关注!将替代传统手机?华为回应来了
  9. [android] 百度地图开发 (二).定位城市位置和城市POI搜索
  10. 获取 docker 容器(container)的 ip 地址
  11. 笔记本 win11 64位专业版iso文件v2021.07
  12. 强强联合,OpenCV搭载飞桨模型,帮你轻松玩转深度学习
  13. html中body呈现属性,HTML body 标签
  14. C#根据word模板生成word表格报表文档
  15. 《精通 ASP.NET MVC 5》----1.5 本书的结构
  16. suse linux11安装 dhcp,Suse Linux DHCP的设定过程
  17. android 常用机型尺寸_android手机屏幕密度和逻辑尺寸
  18. com.android.packageinstaller,Android PackageInstaller 安装和卸载
  19. fake-useragent User Agent 伪装
  20. Mesos-安装和使用

热门文章

  1. jQuery插件之Cookie
  2. CButtonST的用法详解!
  3. 100多个Android Demo的整合
  4. Android 控件学习--自定义SeekBar
  5. 小样本点云深度学习库_2019-01-07-小样本深度学习
  6. 算法 求子数组的最大和 C
  7. C语言实现易语言变量框,c语言实现简单的易语言
  8. 计算机软件的输出设备有哪些,计算机输出设备有哪些?计算机输出设备介绍
  9. matlab算法时间复杂度,关于降低算法时间复杂度问题的探讨和总结
  10. mysql 5.6 gtid mha_MySQL MHA--故障切换模式(GTID模式和非GTID模式)