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.proto.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 Summary
Modifier and TypeMethodDescriptionaddAllDim(Iterable<? extends TensorShapeProto.Dim> values) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addDim(int index, TensorShapeProto.Dim value) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addDim(int index, TensorShapeProto.Dim.Builder builderForValue) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addDim(TensorShapeProto.Dim value) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addDim(TensorShapeProto.Dim.Builder builderForValue) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addDimBuilder(int index) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.addRepeatedField(Descriptors.FieldDescriptor field, Object value) build()clear()clearDim()Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.If true, the number of dimensions in the shape is unknown.clone()static final Descriptors.DescriptorgetDim(int index) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.getDimBuilder(int index) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.intDimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.getDimOrBuilder(int index) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.List<? extends TensorShapeProto.DimOrBuilder> Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.booleanIf true, the number of dimensions in the shape is unknown.protected GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) mergeFrom(TensorShapeProto other) final TensorShapeProto.BuildermergeUnknownFields(UnknownFieldSet unknownFields) removeDim(int index) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.setDim(int index, TensorShapeProto.Dim value) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.setDim(int index, TensorShapeProto.Dim.Builder builderForValue) Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor.setField(Descriptors.FieldDescriptor field, Object value) setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) final TensorShapeProto.BuildersetUnknownFields(UnknownFieldSet unknownFields) setUnknownRank(boolean value) If true, the number of dimensions in the shape is unknown.Methods inherited from class GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface MessageLite.Builder
mergeFromMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clear
- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
getDescriptorForType
- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
clone
- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
setField
- Specified by:
setFieldin interfaceMessage.Builder- Overrides:
setFieldin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clearField
- Specified by:
clearFieldin interfaceMessage.Builder- Overrides:
clearFieldin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clearOneof
- Specified by:
clearOneofin interfaceMessage.Builder- Overrides:
clearOneofin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
setRepeatedField
public TensorShapeProto.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfaceMessage.Builder- Overrides:
setRepeatedFieldin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
addRepeatedField
- Specified by:
addRepeatedFieldin interfaceMessage.Builder- Overrides:
addRepeatedFieldin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<TensorShapeProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
mergeFrom
public TensorShapeProto.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<TensorShapeProto.Builder>- Throws:
IOException
-
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:
getDimListin interfaceTensorShapeProtoOrBuilder
-
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:
getDimCountin interfaceTensorShapeProtoOrBuilder
-
getDim
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:
getDimin interfaceTensorShapeProtoOrBuilder
-
setDim
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
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
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
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
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
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
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
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
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:
getDimOrBuilderin interfaceTensorShapeProtoOrBuilder
-
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:
getDimOrBuilderListin interfaceTensorShapeProtoOrBuilder
-
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
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
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:
getUnknownRankin interfaceTensorShapeProtoOrBuilder- Returns:
- The unknownRank.
-
setUnknownRank
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
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
- Specified by:
setUnknownFieldsin interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfaceMessage.Builder- Overrides:
mergeUnknownFieldsin classGeneratedMessageV3.Builder<TensorShapeProto.Builder>
-