Master_B_mao 2021-06-23 22:07 采纳率: 100%
浏览 517
已采纳

Not found: Failed to c reate a NewWriteableFile:

使用tensorflow时,遇到问题

2021-06-23 21:19:41.397079: W tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at save_restore_v2_ops.cc:109 : Not found: Failed to c
reate a NewWriteableFile: C:/Users/12162/Desktop/model\online_train\read_comment\model.ckpt-0_temp\part-00000-of-00001.data-00000-of-00001.tempstate
1255047267071366445 : 系统找不到指定的路径。
; No such process
Traceback (most recent call last):
  File "D:/wechat/data/wechart_tensorflow.py", line 276, in <module>
    tf.app.run(main)
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "D:\vippython\venv\lib\site-packages\absl\app.py", line 303, in run
    _run_main(main, args)
  File "D:\vippython\venv\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "D:/wechat/data/wechart_tensorflow.py", line 228, in main
    model.train()
  File "D:/wechat/data/wechart_tensorflow.py", line 111, in train
    self.estimator.train(
  File "D:\vippython\venv\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 349, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "D:\vippython\venv\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1175, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "D:\vippython\venv\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1206, in _train_model_default
    return self._train_with_estimator_spec(estimator_spec, worker_hooks,
  File "D:\vippython\venv\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1497, in _train_with_estimator_spec
    with training.MonitoredTrainingSession(
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 602, in MonitoredTrainingSession
    return MonitoredSession(
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 1035, in __init__
    super(MonitoredSession, self).__init__(
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 750, in __init__
    self._sess = _RecoverableSession(self._coordinated_creator)
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 1232, in __init__
    _WrappedSession.__init__(self, self._create_session())
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 1237, in _create_session
    return self._sess_creator.create_session()
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\monitored_session.py", line 910, in create_session
    hook.after_create_session(self.tf_sess, self.coord)
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\basic_session_run_hooks.py", line 587, in after_create_session
    self._save(session, global_step)
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\basic_session_run_hooks.py", line 619, in _save
    self._get_saver().save(session, self._save_path, global_step=step,
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\training\saver.py", line 1188, in save
    model_checkpoint_path = sess.run(
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 967, in run
    result = self._run(None, fetches, feed_dict, options_ptr,
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 1190, in _run
    results = self._do_run(handle, final_targets, final_fetches,
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 1368, in _do_run
    return self._do_call(_run_fn, feeds, fetches, targets, options,
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 1375, in _do_call
    return fn(*args)
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 1359, in _run_fn
    return self._call_tf_sessionrun(options, feed_dict, fetch_list,
  File "D:\vippython\venv\lib\site-packages\tensorflow\python\client\session.py", line 1451, in _call_tf_sessionrun
    return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 185: invalid continuation byte

 

  • 写回答

1条回答 默认 最新

  • CSDN专家-AlanMax 2021-06-23 23:03
    关注

    把原始数据转为utf-8格式就行了。现在应该是GB2312国标码

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 QQ邮箱过期怎么恢复?
  • ¥15 登录他人的vue项目显示服务器错误
  • ¥15 (标签-android|关键词-app)
  • ¥15 微信小程序web-view嵌套H5页面IOS左滑会出现相同的页面,有什么解决方法吗?
  • ¥60 如何批量获取json的url
  • ¥15 comsol仿真压阻传感器
  • ¥15 Python线性规划函数optimize.linprog求解为整数
  • ¥15 llama3中文版微调
  • ¥15 pg数据库导入数据序列重复
  • ¥15 三分类机器学习模型可视化分析