Class TensorShapeProto.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<TensorShapeProto.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
org.tensorflow.framework.TensorShapeProto.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, TensorShapeProtoOrBuilder
Enclosing class:
TensorShapeProto

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

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • clear

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

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

      public TensorShapeProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

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

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

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

      public TensorShapeProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • clearField

      public TensorShapeProto.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • clearOneof

      public TensorShapeProto.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • setRepeatedField

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

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

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

      public TensorShapeProto.Builder mergeFrom(TensorShapeProto other)
    • isInitialized

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

      public TensorShapeProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.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(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
    • mergeUnknownFields

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