How to run demo.py using train.py checkpoint model
ynjiun opened this issue · comments
Hi,
I am running demo.py, train.py and eval.py all correctly using tensorflow-gpu==1.5.0
Now, after training reach 99999 steps, I would like to try to run demo.py pointing to my latest trained squeezeDet model. If I just change the checkpoint path in the demo.py to the train_dir=/tmp/paul/logs/squeezeDet/train directory and it doesn't work. In my train_dir I have the following files:
checkpoint
events.out.tfevents.1584317091.Paul-i7
model.ckpt-99999.data-00000-of-00001
model.ckpt-99999.index
model.ckpt-99999.meta
model_metrics.txt
I did copy those file to ./data/model_checkpoints/squeezeDet/ and even rename the model.ckpt-9999 but it still doesn't work. Is there utility to convert the train_dir files into the ckpt files that would be complied to the format used by demo.py?
What do I need to do to convert the above files into the same format which demo.py can accept like in ./data/model_checkpoints/sqeezeDet/
model.ckpt-87000
model.ckpt-87000.meta
I do realize that there might be tensorflow-gpu version difference:
in your requirements.txt uses tensorflow-gpu=1.0.0
but I use tensorflow-gpu=1.5.0, does that matter?
Thank you very much for your help in advance.
Sincerely yours,
-Paul
found the answer from
https://stackoverflow.com/questions/41265035/tensorflow-why-there-are-3-files-after-saving-the-model
basically
tf.app.flags.DEFINE_string(
'checkpoint', '/tmp/paul/logs/squeezeDet/train/model.ckpt-99999',
"""Path to the model parameter file.""")
so actually the model.ckpt-99999 is not a filename! It's a representation of a set of files which are:
model.ckpt-99999.data-00000-of-00001
model.ckpt-99999.index
Very confusing...