Fail to read the new format of tensorflow checkpoint?

1.7k views Asked by At

I pip installed tensorflow 0.12. I am able to resume training by loading old checkpoints which ends with .ckpk. However, tensorflow 0.12 dumps new checkpoints in a different format including *.index, .data-00000-of-00001 and *.meta. After that, I am not able to restore from the new checkpoint.

What is the proper way of loading the new format? Besides, how to read *index?

1

There are 1 answers

0
onorabil On BEST ANSWER

Mostly duplicate of How to restore a model by filename in Tensorflow r12?

Troubleshooting:

  1. Read common suffix

-stop before the first dot after ckpt

  1. Check model path

absolute

saver.restore(sess, "/full/path/to/model.ckpt")

or relative

saver.restore(sess, "./model.ckpt")

Regarding reading the .index file, as the name suggests, it is the first file to be opened by the restore function. No .index file, no restore (you could still restore without a .meta file).

The .index files needs the data-xxxx-of-xxxx shards, so it would be kind of pointless to read only the .index file, without any tensor data restored. What are you trying to achieve?