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