Failed to remove a directory:train Error Meaning and Resolution in srez Run

Asked 2 years ago, Updated 2 years ago, 44 views

I tried srez, but I got the following error.I don't know how to solve it.
I'd like someone to give me some advice.

ssrez
https://github.com/david-gpu/srez

Run C:\Users\wai\Documents\srez>pythonsrez_main.py --runtrain

Error

C:\Users\wai\Documents\srez>pythonsrez_main.py --runtrain
Traceback (most recent call last):
  File "srez_main.py", line 190, in<module>
    tf.app.run()
  File "C:\Users\wai\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 44, in run
    _sys.exit(main(_sys.argv[:1]+flags_passthrough))
  File "srez_main.py", line 187, in main
    _train()
  File "srez_main.py", line 145, in_train
    all_filenames=prepare_dirs(delete_train_dir=True)
  File "srez_main.py", line 75, prepare_dirs
    tf.gfile.DeleteRecursively (FLAGS.train_dir)
  File "C:\Users\wai\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 366, delete_recursively
    pywrap_tensorflow.DeleteRecursively (compat.as_bytes(dirname), status)
  File "C:\Users\wai\Anaconda3\lib\contextlib.py", line 66, in__exit__
    next(self.gen)
  File "C:\Users\wai\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.FailedPreconditionError: Failed to remove a directory:train

The execution environment is as follows:
OS:Win 8.1
Using Anaconda Navigator 1.3.1
python 3.5.2
tensorflow 1.0.1

The directory configuration is as follows:

Enter a description of the image here

python tensorflow

2022-09-30 17:04

1 Answers

Randy Voet sent me the following reply email for the issue I posted on git hub.
I'm going to check the details now, but I think I can manage it.

I had the same issue and fixed it by swapping prepare_dirs and setup_tensorflow in the_train and_demo functions of srez_main.py (sorry, no pull request yet for this).It items that the creation of the FileWriter in setup_tensorflow causes a file to be prepared.kined.brushed —
You are receiving this because you authorized the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

view it on GitHub is as follows.
https://github.com/david-gpu/srez/issues/28
https://github.com/crimsonxiii/srez/commit/6cd9a31504ec8bedbfcb67a04562d58ca5768364


2022-09-30 17:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.