tensorflow.python.framework.errors_impl.UnknownError:无法重命名:输入/输出错误

Cwa*_*ang 8 python tensorflow

当我应用 tensorflow 热切模式来训练分类器时,我遇到了以下错误。

Steps 151, Train loss is 0.00039766659028828144, learning_rate is 0.009999999776482582
Traceback (most recent call last):
  File "E:/Tensorflow_Experiments/train_alexnet.py", line 1354, in <module>
Run Code Online (Sandbox Code Playgroud)

多次迭代后出现错误,如上所示。但是连续执行的迭代次数是不同的。

  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\contrib\eager\python\saver.py", line 156, in save
    None, file_prefix, write_meta_graph=False, global_step=global_step)
  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1451, in save
    save_relative_paths=self._save_relative_paths)
  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\python\training\checkpoint_management.py", line 237, in update_checkpoint_state_internal
    text_format.MessageToString(ckpt))
  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 436, in atomic_write_string_to_file
    rename(temp_pathname, filename, overwrite)
  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 415, in rename
    compat.as_bytes(oldname), compat.as_bytes(newname), overwrite, status)
  File "C:\Software\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnknownError: Failed to rename: ./hundred_models\model1\checkpoint.tmpc4b15b8c1e2d48b394f810909a0838b6 to: ./hundred_models\model1\checkpoint : \udcbe?\udcf8\udcb7\udcc3\udcce?\udca3
; Input/output error
Run Code Online (Sandbox Code Playgroud)

小智 0

这个答案已经太晚了,但这就是为我解决的问题。

检查您是否有类似名称的文件夹,或者在我的代码中,csv 记录器是否干扰了检查点的创建。