In the latest version (v0.12.0rc), a problem occurred because the checkpoint could not be read.
In v0.12, tf.train.Saver
generates not only * .meta
but also * .index
, and the names of the products are different. This can cause a failure to load a checkpoint generated by an existing tf.train.Saver
(especially programs that directly reference the checkpoint by filename).
In the program, properly get the list of checkpoints by tf.train.Saver.last_checkpoints
, or get the path of the checkpoint specified by latest by tf.train.latest_checkpoint
.
As a provisional measure, the existing (V1) format can be used by specifying write_version = 1
in the constructor of tf.train.Saver
(in v0.12, write_version = 2
is specified by default. Has been changed to). If an error occurs around the checkpoint when porting existing code, it may be resolved by write_version = 1
.
By the way, a few days ago, the TensorFlow API reference was redesigned.
Saver is here.
References
[ISSUE] seq2seq checkpoints not working #6274 https://github.com/tensorflow/tensorflow/issues/6274