• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4option cc_enable_arenas = true;
5option java_outer_classname = "GraphProtos";
6option java_multiple_files = true;
7option java_package = "org.tensorflow.framework";
8option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9import "tensorflow/core/framework/node_def.proto";
10import "tensorflow/core/framework/function.proto";
11import "tensorflow/core/framework/versions.proto";
12
13// Represents the graph of operations
14message GraphDef {
15  repeated NodeDef node = 1;
16
17  // Compatibility versions of the graph.  See core/public/version.h for version
18  // history.  The GraphDef version is distinct from the TensorFlow version, and
19  // each release of TensorFlow will support a range of GraphDef versions.
20  VersionDef versions = 4;
21
22  // Deprecated single version field; use versions above instead.  Since all
23  // GraphDef changes before "versions" was introduced were forward
24  // compatible, this field is entirely ignored.
25  int32 version = 3 [deprecated = true];
26
27  // EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET.
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