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