Package org.tensorflow.framework
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 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(com.google.protobuf.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.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) If true, the number of dimensions in the shape is unknown.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.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 com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(TensorShapeProto other) final TensorShapeProto.BuildermergeUnknownFields(com.google.protobuf.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.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final TensorShapeProto.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setUnknownRank(boolean value) If true, the number of dimensions in the shape is unknown.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
setField
public TensorShapeProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
setRepeatedField
public TensorShapeProto.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
addRepeatedField
public TensorShapeProto.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TensorShapeProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.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
public final TensorShapeProto.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-
mergeUnknownFields
public final TensorShapeProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorShapeProto.Builder>
-