// Protocol buffer representing slices of a tensor

syntax = "proto3";

package tensorflow;

option cc_enable_arenas = true;
option java_outer_classname = "TensorSliceProtos";
option java_multiple_files = true;
option java_package = "org.tensorflow.framework";
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_slice_go_proto";

// Can only be interpreted if you know the corresponding TensorShape.
message TensorSliceProto {
  // Extent of the slice in one dimension.
  message Extent {
    // Either both or no attributes must be set.  When no attribute is set
    // means: All data in that dimension.

    // Start index of the slice, starting at 0.
    int64 start = 1;

    // Length of the slice: if the length is missing or -1 we will
    // interpret this as "everything in this dimension".  This field should
    // be marked 'optional' but for legacy reasons this was placed into a
    // oneof instead.
    oneof has_length_hack {
      int64 length = 2;
    }
  }

  // Extent of the slice in all tensor dimensions.
  //
  // Must have one entry for each of the dimension of the tensor that this
  // slice belongs to.  The order of sizes is the same as the order of
  // dimensions in the TensorShape.
  repeated Extent extent = 1;
}
