最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解決tensorflow1.x版本加載saver.restore目錄報(bào)錯(cuò)的問題

 更新時(shí)間:2018年07月26日 10:05:33   作者:風(fēng)行水上cs  
今天小編就為大家分享一篇解決tensorflow1.x版本加載saver.restore目錄報(bào)錯(cuò)的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧

這個(gè)錯(cuò)誤是最新的錯(cuò)誤哈,目前只在tensorflow上的github倉庫上面有提出,所以你在百度上面找不到。

是個(gè)tensorflow的bug十天前提出的,只有g(shù)ithub倉庫上一個(gè)地方有提出。

NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: 

Failed to find any matching files for xxx
Traceback (most recent call last):
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1022, in _do_call
  return fn(*args)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1004, in _run_fn
  status, run_metadata)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\contextlib.py", line 66, in __exit__
  next(self.gen)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
  pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for D://model.ckpt
	 [[Node: save_1/RestoreV2_10 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_10/tensor_names, save_1/RestoreV2_10/shape_and_slices)]]
 
During handling of the above exception, another exception occurred:
 
Traceback (most recent call last):
 File "F:/DeepStock/DeepStock/testCapacity.py", line 77, in <module>
  prediction(out)
 File "F:/DeepStock/DeepStock/testCapacity.py", line 63, in prediction
  saver.restore(sess, 'D://model.ckpt')
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 1428, in restore
  {self.saver_def.filename_tensor_name: save_path})
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 767, in run
  run_metadata_ptr)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 965, in _run
  feed_dict_string, options, run_metadata)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1015, in _do_run
  target_list, options, run_metadata)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1035, in _do_call
  raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for D://model.ckpt
	 [[Node: save_1/RestoreV2_10 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_10/tensor_names, save_1/RestoreV2_10/shape_and_slices)]]
 
Caused by op 'save_1/RestoreV2_10', defined at:
 File "F:/DeepStock/DeepStock/testCapacity.py", line 77, in <module>
  prediction(out)
 File "F:/DeepStock/DeepStock/testCapacity.py", line 60, in prediction
  saver = tf.train.Saver(tf.global_variables())
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 1040, in __init__
  self.build()
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 1070, in build
  restore_sequentially=self._restore_sequentially)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 675, in build
  restore_sequentially, reshape)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 402, in _AddRestoreOps
  tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\training\saver.py", line 242, in restore_op
  [spec.tensor.dtype])[0])
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 668, in restore_v2
  dtypes=dtypes, name=name)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 763, in apply_op
  op_def=op_def)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2327, in create_op
  original_op=self._default_original_op, op_def=op_def)
 File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 1226, in __init__
  self._traceback = _extract_stack()
 
NotFoundError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to find any matching files for D://model.ckpt
	 [[Node: save_1/RestoreV2_10 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save_1/Const_0, save_1/RestoreV2_10/tensor_names, save_1/RestoreV2_10/shape_and_slices)]]
 

改之前代碼:

saver.restore(sess, 'D://model.ckpt')

將前面加上個(gè)點(diǎn)斜杠就好了。

saver.restore(sess, 'D://./model.ckpt')

如果你目錄太復(fù)雜實(shí)在搞不明白用這個(gè)(默認(rèn)加載checkout 文件中的最新的保存的數(shù)據(jù)):

module_file = tf.train.latest_checkpoint('E://deeplearning-master/deeplearning-master/tensorflow-program/save/')
with tf.Session() as sess:
  sess.run(tf.global_variables_initializer())
  if module_file is not None:
    saver.restore(sess, module_file)

以上這篇解決tensorflow1.x版本加載saver.restore目錄報(bào)錯(cuò)的問題就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • pycharm配置安裝autopep8自動(dòng)規(guī)范代碼的實(shí)現(xiàn)

    pycharm配置安裝autopep8自動(dòng)規(guī)范代碼的實(shí)現(xiàn)

    這篇文章主要介紹了pycharm配置安裝autopep8自動(dòng)規(guī)范代碼的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-03-03
  • Python如何使用隊(duì)列方式實(shí)現(xiàn)多線程爬蟲

    Python如何使用隊(duì)列方式實(shí)現(xiàn)多線程爬蟲

    這篇文章主要介紹了Python如何使用隊(duì)列方式實(shí)現(xiàn)多線程爬蟲,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-05-05
  • matlab中實(shí)現(xiàn)矩陣刪除一行或一列的方法

    matlab中實(shí)現(xiàn)矩陣刪除一行或一列的方法

    下面小編就為大家分享一篇matlab中實(shí)現(xiàn)矩陣刪除一行或一列的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2018-04-04
  • 詳解Django的MVT設(shè)計(jì)模式

    詳解Django的MVT設(shè)計(jì)模式

    本章我們將介紹下經(jīng)典的軟件開發(fā)所遵循的MVC (Model-View-Controller, 模型-視圖-控制器) 設(shè)計(jì)模式以及Django的MVT設(shè)計(jì)模式(Model-View-Template)是如何遵循這種設(shè)計(jì)理念的。
    2021-04-04
  • python中的Pyperclip模塊功能詳解

    python中的Pyperclip模塊功能詳解

    pyperclip模塊中有兩個(gè)函數(shù),分別是copy()和paste(),copy()用于向計(jì)算機(jī)的剪貼板發(fā)送文本,paste()用于從計(jì)算機(jī)剪貼板接收文本,這篇文章主要介紹了python中的Pyperclip模塊,需要的朋友可以參考下
    2023-03-03
  • Python實(shí)現(xiàn)批量翻譯CAD圖紙

    Python實(shí)現(xiàn)批量翻譯CAD圖紙

    這篇文章主要為大家詳細(xì)介紹了如何通過Python實(shí)現(xiàn)批量翻譯CAD圖紙,文中的示例代碼講解詳細(xì),具有一定的借鑒價(jià)值,感興趣的小伙伴可以學(xué)習(xí)一下
    2023-12-12
  • Python實(shí)現(xiàn)一個(gè)發(fā)送程序和接收程序

    Python實(shí)現(xiàn)一個(gè)發(fā)送程序和接收程序

    這篇文章主要介紹了Python實(shí)現(xiàn)一個(gè)發(fā)送程序和接收程序,文章圍繞主題展開詳細(xì)的內(nèi)容介紹,具有一定的參考價(jià)值,需要的小伙伴可以參考一下
    2022-09-09
  • 關(guān)于Pytorch的MLP模塊實(shí)現(xiàn)方式

    關(guān)于Pytorch的MLP模塊實(shí)現(xiàn)方式

    今天小編就為大家分享一篇關(guān)于Pytorch的MLP模塊實(shí)現(xiàn)方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2020-01-01
  • django在接受post請(qǐng)求時(shí)顯示403forbidden實(shí)例解析

    django在接受post請(qǐng)求時(shí)顯示403forbidden實(shí)例解析

    這篇文章主要介紹了django在接受post請(qǐng)求時(shí)顯示403forbidden實(shí)例解析,小編覺得還是挺不錯(cuò)的,具有一定借鑒價(jià)值,需要的朋友可以參考下
    2018-01-01
  • wxPython窗體拆分布局基礎(chǔ)組件

    wxPython窗體拆分布局基礎(chǔ)組件

    這篇文章主要為大家詳細(xì)介紹了wxPython窗體拆分布局基礎(chǔ)組件,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-11-11

最新評(píng)論

大港区| 辰溪县| 饶河县| 山东省| 乐都县| 忻城县| 休宁县| 江都市| 台湾省| 宁晋县| 三亚市| 盐边县| 石屏县| 玉山县| 巴彦淖尔市| 哈尔滨市| 大埔县| 贵州省| 疏附县| 凤阳县| 大名县| 鄂托克前旗| 福泉市| 鹤壁市| 麻城市| 瓮安县| 金沙县| 民勤县| 琼中| 交城县| 藁城市| 永仁县| 台州市| 大姚县| 平乡县| 崇左市| 突泉县| 开平市| 武威市| 伊川县| 丹凤县|