Class TensorShapeProto.Builder

All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, TensorShapeProtoOrBuilder
Enclosing class:
TensorShapeProto

public static final class TensorShapeProto.Builder extends GeneratedMessageV3.Builder<TensorShapeProto.Builder> implements TensorShapeProtoOrBuilder
Dimensions of a tensor.
Protobuf type tensorflow.TensorShapeProto
  • Method Details

    • getDescriptor

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

    • clear

      public TensorShapeProto.Builder clear()
      Specified by:
      clear in interface Message.Builder
      Specified by:
      clear in interface MessageLite.Builder
      Overrides:
      clear in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • getDescriptorForType

      public Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface Message.Builder
      Specified by:
      getDescriptorForType in interface MessageOrBuilder
      Overrides:
      getDescriptorForType in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • getDefaultInstanceForType

      public TensorShapeProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface MessageOrBuilder
    • build

      public TensorShapeProto build()
      Specified by:
      build in interface Message.Builder
      Specified by:
      build in interface MessageLite.Builder
    • buildPartial

      public TensorShapeProto buildPartial()
      Specified by:
      buildPartial in interface Message.Builder
      Specified by:
      buildPartial in interface MessageLite.Builder
    • clone

      public TensorShapeProto.Builder clone()
      Specified by:
      clone in interface Message.Builder
      Specified by:
      clone in interface MessageLite.Builder
      Overrides:
      clone in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • setField

      Specified by:
      setField in interface Message.Builder
      Overrides:
      setField in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • clearField

    • clearOneof

    • setRepeatedField

      public TensorShapeProto.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface Message.Builder
      Overrides:
      setRepeatedField in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • addRepeatedField

      public TensorShapeProto.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface Message.Builder
      Overrides:
      addRepeatedField in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • mergeFrom

      public TensorShapeProto.Builder mergeFrom(Message other)
      Specified by:
      mergeFrom in interface Message.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<TensorShapeProto.Builder>
    • mergeFrom

      public TensorShapeProto.Builder mergeFrom(TensorShapeProto other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface MessageLiteOrBuilder
      Overrides:
      isInitialized in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • mergeFrom

      public TensorShapeProto.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface Message.Builder
      Specified by:
      mergeFrom in interface MessageLite.Builder
      Overrides:
      mergeFrom in class AbstractMessage.Builder<TensorShapeProto.Builder>
      Throws:
      IOException
    • getDimList

      public List<TensorShapeProto.Dim> getDimList()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      Specified by:
      getDimList in interface TensorShapeProtoOrBuilder
    • getDimCount

      public int getDimCount()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      Specified by:
      getDimCount in interface TensorShapeProtoOrBuilder
    • getDim

      public TensorShapeProto.Dim getDim(int index)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      Specified by:
      getDim in interface TensorShapeProtoOrBuilder
    • setDim

      public TensorShapeProto.Builder setDim(int index, TensorShapeProto.Dim value)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • setDim

      public TensorShapeProto.Builder setDim(int index, TensorShapeProto.Dim.Builder builderForValue)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addDim

      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addDim

      public TensorShapeProto.Builder addDim(int index, TensorShapeProto.Dim value)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addDim

      public TensorShapeProto.Builder addDim(TensorShapeProto.Dim.Builder builderForValue)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addDim

      public TensorShapeProto.Builder addDim(int index, TensorShapeProto.Dim.Builder builderForValue)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addAllDim

      public TensorShapeProto.Builder addAllDim(Iterable<? extends TensorShapeProto.Dim> values)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • clearDim

      public TensorShapeProto.Builder clearDim()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • removeDim

      public TensorShapeProto.Builder removeDim(int index)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • getDimBuilder

      public TensorShapeProto.Dim.Builder getDimBuilder(int index)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • getDimOrBuilder

      public TensorShapeProto.DimOrBuilder getDimOrBuilder(int index)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      Specified by:
      getDimOrBuilder in interface TensorShapeProtoOrBuilder
    • getDimOrBuilderList

      public List<? extends TensorShapeProto.DimOrBuilder> getDimOrBuilderList()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
      Specified by:
      getDimOrBuilderList in interface TensorShapeProtoOrBuilder
    • addDimBuilder

      public TensorShapeProto.Dim.Builder addDimBuilder()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • addDimBuilder

      public TensorShapeProto.Dim.Builder addDimBuilder(int index)
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • getDimBuilderList

      public List<TensorShapeProto.Dim.Builder> getDimBuilderList()
      Dimensions of the tensor, such as {"input", 30}, {"output", 40}
      for a 30 x 40 2D tensor.  If an entry has size -1, this
      corresponds to a dimension of unknown size. The names are
      optional.
      The order of entries in "dim" matters: It indicates the layout of the
      values in the tensor in-memory representation.
      The first entry in "dim" is the outermost dimension used to layout the
      values, the last entry is the innermost dimension.  This matches the
      in-memory layout of RowMajor Eigen tensors.
      If "dim.size()" > 0, "unknown_rank" must be false.
      
      repeated .tensorflow.TensorShapeProto.Dim dim = 2;
    • getUnknownRank

      public boolean getUnknownRank()
      If true, the number of dimensions in the shape is unknown.
      If true, "dim.size()" must be 0.
      
      bool unknown_rank = 3;
      Specified by:
      getUnknownRank in interface TensorShapeProtoOrBuilder
      Returns:
      The unknownRank.
    • setUnknownRank

      public TensorShapeProto.Builder setUnknownRank(boolean value)
      If true, the number of dimensions in the shape is unknown.
      If true, "dim.size()" must be 0.
      
      bool unknown_rank = 3;
      Parameters:
      value - The unknownRank to set.
      Returns:
      This builder for chaining.
    • clearUnknownRank

      public TensorShapeProto.Builder clearUnknownRank()
      If true, the number of dimensions in the shape is unknown.
      If true, "dim.size()" must be 0.
      
      bool unknown_rank = 3;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final TensorShapeProto.Builder setUnknownFields(UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface Message.Builder
      Overrides:
      setUnknownFields in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • mergeUnknownFields

      public final TensorShapeProto.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface Message.Builder
      Overrides:
      mergeUnknownFields in class GeneratedMessageV3.Builder<TensorShapeProto.Builder>