srez実行してもましたが、下記エラー出ました。解決方法がわかりません。  
どなたか、アドバイスいただきたいです。

※srez  
<https://github.com/david-gpu/srez>

`C:\Users\wai\Documents\srez>python srez_main.py --run train` を実行

エラー

```

    C:\Users\wai\Documents\srez>python srez_main.py --run train
    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, in 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, in 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, in raise_exception_on_not_ok_status
        pywrap_tensorflow.TF_GetCode(status))
    tensorflow.python.framework.errors_impl.FailedPreconditionError: Failed to remove a directory: train
    
```

実行環境は下記のとおりです。  
ＯＳ：Win8.1  
Anaconda Nvigator 1.3.1 使用  
python 3.5.2  
tensorflow 1.0.1

ディレクトリ構成は下記です。

[![画像の説明をここに入力](https://i.stack.imgur.com/8bd4Q.jpg)](https://i.stack.imgur.com/8bd4Q.jpg)
CC BY-SA 3.0
2017-04-20T21:58:30.457
34171
2017-04-30T13:25:05.663
2017-04-22T01:24:50.430
20371
20371
question
python tensorflow
srez実行で　Failed to remove a directory: train　のエラーの意味と解決法
git hubに投稿したissueにRandy Voetさんから下記回答メールきました。  
これから、詳細確認予定ですが、なんとかなりそうです。

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 seems that the creation of the FileWriter in
setup_tensorflow causes a file to be created in the train folder, which is
kept locked.  
—  
You are receiving this because you authored the thread.  
Reply to this email directly, view it on GitHub, or mute the thread.

view it on GitHubは下記。  
<https://github.com/david-gpu/srez/issues/28>  
<https://github.com/crimsonxiii/srez/commit/6cd9a31504ec8bedbfcb67a04562d58ca5768364>
CC BY-SA 3.0
2017-04-30T13:25:05.663
34392
2017-04-30T13:25:05.663
20371
34171
answer