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