1syntax = "proto3";
2
3package tensorflow;
4
5option cc_enable_arenas = true;
6option java_outer_classname = "SaverProtos";
7option java_multiple_files = true;
8option java_package = "org.tensorflow.util";
9option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto";
10
11// Protocol buffer representing the configuration of a Saver.
12message SaverDef {
13  // The name of the tensor in which to specify the filename when saving or
14  // restoring a model checkpoint.
15  string filename_tensor_name = 1;
16
17  // The operation to run when saving a model checkpoint.
18  string save_tensor_name = 2;
19
20  // The operation to run when restoring a model checkpoint.
21  string restore_op_name = 3;
22
23  // Maximum number of checkpoints to keep.  If 0, no checkpoints are deleted.
24  int32 max_to_keep = 4;
25
26  // Shard the save files, one per device that has Variable nodes.
27  bool sharded = 5;
28
29  // How often to keep an additional checkpoint. If not specified, only the last
30  // "max_to_keep" checkpoints are kept; if specified, in addition to keeping
31  // the last "max_to_keep" checkpoints, an additional checkpoint will be kept
32  // for every n hours of training.
33  float keep_checkpoint_every_n_hours = 6;
34
35  // A version number that identifies a different on-disk checkpoint format.
36  // Usually, each subclass of BaseSaverBuilder works with a particular
37  // version/format.  However, it is possible that the same builder may be
38  // upgraded to support a newer checkpoint format in the future.
39  enum CheckpointFormatVersion {
40    // Internal legacy format.
41    LEGACY = 0;
42    // Deprecated format: tf.Saver() which works with tensorflow::table::Table.
43    V1 = 1;
44    // Current format: more efficient.
45    V2 = 2;
46  }
47  CheckpointFormatVersion version = 7;
48}
49