models icon indicating copy to clipboard operation
models copied to clipboard

Why delete “train_dir” at the beginning of training?

Open drcege opened this issue 10 years ago • 3 comments

In inception_train.py, model checkpoint was periodically saved in train_dir . Unfortunately, next time I fine tune a chechpoint model , train_dir was deleted first. Then I found

if tf.gfile.Exists(FLAGS.train_dir):
    tf.gfile.DeleteRecursively(FLAGS.train_dir)

However, I lost all of my checkpoins before I read the codes.

drcege avatar May 10 '16 07:05 drcege

This is a question better suited for StackOverflow. Please ask it there and tag it with the tensorflow tag

andydavis1 avatar Jun 28 '16 00:06 andydavis1

this is a directory where to write event logs, so delete all logs when begin training.

InsaneLife avatar Aug 01 '17 03:08 InsaneLife

Plz comment

(tensorflow) D:\my-work\WiS - alert - 2\models\research\object_detection>python train.py --logtostderr --train_dir= D:/my-work/WiS - alert - 2 /models/research/object_detection/training/ --pipeline_config_path= D:/my-work/WiS - alert - 2 /models/research/object_detection/training/ssd_mobilenet_v1_coco.config D:\installation\anaconda\envs\tensorflow\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "train.py", line 164, in tf.app.run() File "D:\installation\anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "train.py", line 88, in main assert FLAGS.train_dir, 'train_dir is missing.' AssertionError: train_dir is missing.

pamrani avatar Dec 26 '19 04:12 pamrani