• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol buffer representing slices of a tensor
2
3syntax = "proto3";
4option cc_enable_arenas = true;
5option java_outer_classname = "TensorSliceProtos";
6option java_multiple_files = true;
7option java_package = "org.tensorflow.framework";
8option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework";
9
10package tensorflow;
11
12// Can only be interpreted if you know the corresponding TensorShape.
13message TensorSliceProto {
14  // Extent of the slice in one dimension.
15  message Extent {
16    // Either both or no attributes must be set.  When no attribute is set
17    // means: All data in that dimension.
18
19    // Start index of the slice, starting at 0.
20    int64 start = 1;
21
22    // Length of the slice: if the length is missing or -1 we will
23    // interpret this as "everything in this dimension".  We use
24    // "oneof" to preserve information about whether the length is
25    // present without changing the serialization format from the
26    // prior proto2 version of this proto.
27    oneof has_length {
28      int64 length = 2;
29    }
30  };
31
32  // Extent of the slice in all tensor dimensions.
33  //
34  // Must have one entry for each of the dimension of the tensor that this
35  // slice belongs to.  The order of sizes is the same as the order of
36  // dimensions in the TensorShape.
37  repeated Extent extent = 1;
38};
39