• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3option cc_enable_arenas = true;
4
5package tensorflow;
6
7// A TensorBundle addition which saves extra information about the objects which
8// own variables, allowing for more robust checkpoint loading into modified
9// programs.
10
11message TrackableObjectGraph {
12  message TrackableObject {
13    message ObjectReference {
14      // An index into `TrackableObjectGraph.nodes`, indicating the object
15      // being referenced.
16      int32 node_id = 1;
17      // A user-provided name for the edge.
18      string local_name = 2;
19    }
20
21    message SerializedTensor {
22      // A name for the Tensor. Simple variables have only one
23      // `SerializedTensor` named "VARIABLE_VALUE" by convention. This value may
24      // be restored on object creation as an optimization.
25      string name = 1;
26      // The full name of the variable/tensor, if applicable. Used to allow
27      // name-based loading of checkpoints which were saved using an
28      // object-based API. Should match the checkpoint key which would have been
29      // assigned by tf.train.Saver.
30      string full_name = 2;
31      // The generated name of the Tensor in the checkpoint.
32      string checkpoint_key = 3;
33      // Whether checkpoints should be considered as matching even without this
34      // value restored. Used for non-critical values which don't affect the
35      // TensorFlow graph, such as layer configurations.
36      bool optional_restore = 4;
37    }
38
39    message SlotVariableReference {
40      // An index into `TrackableObjectGraph.nodes`, indicating the
41      // variable object this slot was created for.
42      int32 original_variable_node_id = 1;
43      // The name of the slot (e.g. "m"/"v").
44      string slot_name = 2;
45      // An index into `TrackableObjectGraph.nodes`, indicating the
46      // `Object` with the value of the slot variable.
47      int32 slot_variable_node_id = 3;
48    }
49
50    // Objects which this object depends on.
51    repeated ObjectReference children = 1;
52    // Serialized data specific to this object.
53    repeated SerializedTensor attributes = 2;
54    // Slot variables owned by this object.
55    repeated SlotVariableReference slot_variables = 3;
56  }
57
58  repeated TrackableObject nodes = 1;
59}
60