1syntax = "proto3"; 2 3package tensorflow; 4 5import "tensorflow/core/framework/function.proto"; 6import "tensorflow/core/framework/node_def.proto"; 7import "tensorflow/core/framework/versions.proto"; 8 9option cc_enable_arenas = true; 10option java_outer_classname = "GraphProtos"; 11option java_multiple_files = true; 12option java_package = "org.tensorflow.framework"; 13option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/graph_go_proto"; 14 15// Represents the graph of operations 16message GraphDef { 17 repeated NodeDef node = 1; 18 19 // Compatibility versions of the graph. See core/public/version.h for version 20 // history. The GraphDef version is distinct from the TensorFlow version, and 21 // each release of TensorFlow will support a range of GraphDef versions. 22 VersionDef versions = 4; 23 24 // Deprecated single version field; use versions above instead. Since all 25 // GraphDef changes before "versions" was introduced were forward 26 // compatible, this field is entirely ignored. 27 int32 version = 3 [deprecated = true]; 28 29 // "library" provides user-defined functions. 30 // 31 // Naming: 32 // * library.function.name are in a flat namespace. 33 // NOTE: We may need to change it to be hierarchical to support 34 // different orgs. E.g., 35 // { "/google/nn", { ... }}, 36 // { "/google/vision", { ... }} 37 // { "/org_foo/module_bar", { ... }} 38 // map<string, FunctionDefLib> named_lib; 39 // * If node[i].op is the name of one function in "library", 40 // node[i] is deemed as a function call. Otherwise, node[i].op 41 // must be a primitive operation supported by the runtime. 42 // 43 // 44 // Function call semantics: 45 // 46 // * The callee may start execution as soon as some of its inputs 47 // are ready. The caller may want to use Tuple() mechanism to 48 // ensure all inputs are ready in the same time. 49 // 50 // * The consumer of return values may start executing as soon as 51 // the return values the consumer depends on are ready. The 52 // consumer may want to use Tuple() mechanism to ensure the 53 // consumer does not start until all return values of the callee 54 // function are ready. 55 FunctionDefLibrary library = 2; 56} 57