• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4
5import "tensorflow/core/framework/tensor_shape.proto";
6import "tensorflow/core/framework/types.proto";
7
8option cc_enable_arenas = true;
9option java_outer_classname = "ResourceHandle";
10option java_multiple_files = true;
11option java_package = "org.tensorflow.framework";
12option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto";
13
14// Protocol buffer representing a handle to a tensorflow resource. Handles are
15// not valid across executions, but can be serialized back and forth from within
16// a single run.
17message ResourceHandleProto {
18  // Unique name for the device containing the resource.
19  string device = 1;
20
21  // Container in which this resource is placed.
22  string container = 2;
23
24  // Unique name of this resource.
25  string name = 3;
26
27  // Hash code for the type of the resource. Is only valid in the same device
28  // and in the same execution.
29  uint64 hash_code = 4;
30
31  // For debug-only, the name of the type pointed to by this handle, if
32  // available.
33  string maybe_type_name = 5;
34
35  // Protocol buffer representing a pair of (data type, tensor shape).
36  message DtypeAndShape {
37    DataType dtype = 1;
38    TensorShapeProto shape = 2;
39  }
40
41  // Data types and shapes for the underlying resource.
42  repeated DtypeAndShape dtypes_and_shapes = 6;
43
44  reserved 7;
45}
46