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