Package org.tensorflow.framework
Class TensorProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<TensorProto.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
org.tensorflow.framework.TensorProto.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,TensorProtoOrBuilder
- Enclosing class:
TensorProto
public static final class TensorProto.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
implements TensorProtoOrBuilder
Protocol buffer representing a tensor.Protobuf type
tensorflow.TensorProto-
Method Summary
Modifier and TypeMethodDescriptionaddAllBoolVal(Iterable<? extends Boolean> values) DT_BOOLaddAllDcomplexVal(Iterable<? extends Double> values) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.addAllDoubleVal(Iterable<? extends Double> values) DT_DOUBLE.addAllFloatVal(Iterable<? extends Float> values) DT_FLOAT.addAllHalfVal(Iterable<? extends Integer> values) DT_HALF, DT_BFLOAT16.addAllInt64Val(Iterable<? extends Long> values) DT_INT64addAllIntVal(Iterable<? extends Integer> values) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.addAllResourceHandleVal(Iterable<? extends ResourceHandleProto> values) DT_RESOURCEaddAllScomplexVal(Iterable<? extends Float> values) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.addAllStringVal(Iterable<? extends com.google.protobuf.ByteString> values) DT_STRINGaddAllUint32Val(Iterable<? extends Integer> values) DT_UINT32addAllUint64Val(Iterable<? extends Long> values) DT_UINT64addAllVariantVal(Iterable<? extends VariantTensorDataProto> values) DT_VARIANTaddBoolVal(boolean value) DT_BOOLaddDcomplexVal(double value) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.addDoubleVal(double value) DT_DOUBLE.addFloatVal(float value) DT_FLOAT.addHalfVal(int value) DT_HALF, DT_BFLOAT16.addInt64Val(long value) DT_INT64addIntVal(int value) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addResourceHandleVal(int index, ResourceHandleProto value) DT_RESOURCEaddResourceHandleVal(int index, ResourceHandleProto.Builder builderForValue) DT_RESOURCEDT_RESOURCEaddResourceHandleVal(ResourceHandleProto.Builder builderForValue) DT_RESOURCEDT_RESOURCEaddResourceHandleValBuilder(int index) DT_RESOURCEaddScomplexVal(float value) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.addStringVal(com.google.protobuf.ByteString value) DT_STRINGaddUint32Val(int value) DT_UINT32addUint64Val(long value) DT_UINT64addVariantVal(int index, VariantTensorDataProto value) DT_VARIANTaddVariantVal(int index, VariantTensorDataProto.Builder builderForValue) DT_VARIANTDT_VARIANTaddVariantVal(VariantTensorDataProto.Builder builderForValue) DT_VARIANTDT_VARIANTaddVariantValBuilder(int index) DT_VARIANTbuild()clear()DT_BOOLDT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.DT_DOUBLE.Data type of the tensor.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).DT_FLOAT.DT_HALF, DT_BFLOAT16.DT_INT64DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) DT_RESOURCEDT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.DT_STRINGSerialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.Shape of the tensor.DT_UINT32DT_UINT64DT_VARIANTVersion number.clone()booleangetBoolVal(int index) DT_BOOLintDT_BOOLDT_BOOLdoublegetDcomplexVal(int index) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.intDT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptordoublegetDoubleVal(int index) DT_DOUBLE.intDT_DOUBLE.DT_DOUBLE.getDtype()Data type of the tensor.intData type of the tensor.com.google.protobuf.ByteStringDT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).floatgetFloatVal(int index) DT_FLOAT.intDT_FLOAT.DT_FLOAT.intgetHalfVal(int index) DT_HALF, DT_BFLOAT16.intDT_HALF, DT_BFLOAT16.DT_HALF, DT_BFLOAT16.longgetInt64Val(int index) DT_INT64intDT_INT64DT_INT64intgetIntVal(int index) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.intDT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.getResourceHandleVal(int index) DT_RESOURCEgetResourceHandleValBuilder(int index) DT_RESOURCEDT_RESOURCEintDT_RESOURCEDT_RESOURCEgetResourceHandleValOrBuilder(int index) DT_RESOURCEList<? extends ResourceHandleProtoOrBuilder> DT_RESOURCEfloatgetScomplexVal(int index) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.intDT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.com.google.protobuf.ByteStringgetStringVal(int index) DT_STRINGintDT_STRINGList<com.google.protobuf.ByteString> DT_STRINGcom.google.protobuf.ByteStringSerialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.Shape of the tensor.Shape of the tensor.Shape of the tensor.intgetUint32Val(int index) DT_UINT32intDT_UINT32DT_UINT32longgetUint64Val(int index) DT_UINT64intDT_UINT64DT_UINT64getVariantVal(int index) DT_VARIANTgetVariantValBuilder(int index) DT_VARIANTDT_VARIANTintDT_VARIANTDT_VARIANTgetVariantValOrBuilder(int index) DT_VARIANTList<? extends VariantTensorDataProtoOrBuilder> DT_VARIANTintVersion number.booleanShape of the tensor.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(TensorProto other) mergeTensorShape(TensorShapeProto value) Shape of the tensor.final TensorProto.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeResourceHandleVal(int index) DT_RESOURCEremoveVariantVal(int index) DT_VARIANTsetBoolVal(int index, boolean value) DT_BOOLsetDcomplexVal(int index, double value) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.setDoubleVal(int index, double value) DT_DOUBLE.Data type of the tensor.setDtypeValue(int value) Data type of the tensor.setFloat8Val(com.google.protobuf.ByteString value) DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).setFloatVal(int index, float value) DT_FLOAT.setHalfVal(int index, int value) DT_HALF, DT_BFLOAT16.setInt64Val(int index, long value) DT_INT64setIntVal(int index, int value) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setResourceHandleVal(int index, ResourceHandleProto value) DT_RESOURCEsetResourceHandleVal(int index, ResourceHandleProto.Builder builderForValue) DT_RESOURCEsetScomplexVal(int index, float value) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.setStringVal(int index, com.google.protobuf.ByteString value) DT_STRINGsetTensorContent(com.google.protobuf.ByteString value) Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer.setTensorShape(TensorShapeProto value) Shape of the tensor.setTensorShape(TensorShapeProto.Builder builderForValue) Shape of the tensor.setUint32Val(int index, int value) DT_UINT32setUint64Val(int index, long value) DT_UINT64final TensorProto.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setVariantVal(int index, VariantTensorDataProto value) DT_VARIANTsetVariantVal(int index, VariantTensorDataProto.Builder builderForValue) DT_VARIANTsetVersionNumber(int value) Version number.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<TensorProto.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<TensorProto.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<TensorProto.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<TensorProto.Builder>
-
setField
public TensorProto.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<TensorProto.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
-
setRepeatedField
public TensorProto.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<TensorProto.Builder>
-
addRepeatedField
public TensorProto.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<TensorProto.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TensorProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
-
mergeFrom
public TensorProto.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<TensorProto.Builder>- Throws:
IOException
-
getDtypeValue
public int getDtypeValue()Data type of the tensor.
.tensorflow.DataType dtype = 1;- Specified by:
getDtypeValuein interfaceTensorProtoOrBuilder- Returns:
- The enum numeric value on the wire for dtype.
-
setDtypeValue
Data type of the tensor.
.tensorflow.DataType dtype = 1;- Parameters:
value- The enum numeric value on the wire for dtype to set.- Returns:
- This builder for chaining.
-
getDtype
Data type of the tensor.
.tensorflow.DataType dtype = 1;- Specified by:
getDtypein interfaceTensorProtoOrBuilder- Returns:
- The dtype.
-
setDtype
Data type of the tensor.
.tensorflow.DataType dtype = 1;- Parameters:
value- The dtype to set.- Returns:
- This builder for chaining.
-
clearDtype
Data type of the tensor.
.tensorflow.DataType dtype = 1;- Returns:
- This builder for chaining.
-
hasTensorShape
public boolean hasTensorShape()Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2;- Specified by:
hasTensorShapein interfaceTensorProtoOrBuilder- Returns:
- Whether the tensorShape field is set.
-
getTensorShape
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2;- Specified by:
getTensorShapein interfaceTensorProtoOrBuilder- Returns:
- The tensorShape.
-
setTensorShape
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
setTensorShape
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
mergeTensorShape
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
clearTensorShape
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
getTensorShapeBuilder
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2; -
getTensorShapeOrBuilder
Shape of the tensor. TODO(touts): sort out the 0-rank issues.
.tensorflow.TensorShapeProto tensor_shape = 2;- Specified by:
getTensorShapeOrBuilderin interfaceTensorProtoOrBuilder
-
getVersionNumber
public int getVersionNumber()Version number. In version 0, if the "repeated xxx" representations contain only one element, that element is repeated to fill the shape. This makes it easy to represent a constant Tensor with a single value.
int32 version_number = 3;- Specified by:
getVersionNumberin interfaceTensorProtoOrBuilder- Returns:
- The versionNumber.
-
setVersionNumber
Version number. In version 0, if the "repeated xxx" representations contain only one element, that element is repeated to fill the shape. This makes it easy to represent a constant Tensor with a single value.
int32 version_number = 3;- Parameters:
value- The versionNumber to set.- Returns:
- This builder for chaining.
-
clearVersionNumber
Version number. In version 0, if the "repeated xxx" representations contain only one element, that element is repeated to fill the shape. This makes it easy to represent a constant Tensor with a single value.
int32 version_number = 3;- Returns:
- This builder for chaining.
-
getTensorContent
public com.google.protobuf.ByteString getTensorContent()Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation can be used for all tensor types. The purpose of this representation is to reduce serialization overhead during RPC call by avoiding serialization of many repeated small items.
bytes tensor_content = 4;- Specified by:
getTensorContentin interfaceTensorProtoOrBuilder- Returns:
- The tensorContent.
-
setTensorContent
Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation can be used for all tensor types. The purpose of this representation is to reduce serialization overhead during RPC call by avoiding serialization of many repeated small items.
bytes tensor_content = 4;- Parameters:
value- The tensorContent to set.- Returns:
- This builder for chaining.
-
clearTensorContent
Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation can be used for all tensor types. The purpose of this representation is to reduce serialization overhead during RPC call by avoiding serialization of many repeated small items.
bytes tensor_content = 4;- Returns:
- This builder for chaining.
-
getHalfValList
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Specified by:
getHalfValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the halfVal.
-
getHalfValCount
public int getHalfValCount()DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Specified by:
getHalfValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of halfVal.
-
getHalfVal
public int getHalfVal(int index) DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Specified by:
getHalfValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The halfVal at the given index.
-
setHalfVal
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Parameters:
index- The index to set the value at.value- The halfVal to set.- Returns:
- This builder for chaining.
-
addHalfVal
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Parameters:
value- The halfVal to add.- Returns:
- This builder for chaining.
-
addAllHalfVal
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Parameters:
values- The halfVal to add.- Returns:
- This builder for chaining.
-
clearHalfVal
DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here.
repeated int32 half_val = 13 [packed = true];- Returns:
- This builder for chaining.
-
getFloatValList
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Specified by:
getFloatValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the floatVal.
-
getFloatValCount
public int getFloatValCount()DT_FLOAT.
repeated float float_val = 5 [packed = true];- Specified by:
getFloatValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of floatVal.
-
getFloatVal
public float getFloatVal(int index) DT_FLOAT.
repeated float float_val = 5 [packed = true];- Specified by:
getFloatValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The floatVal at the given index.
-
setFloatVal
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Parameters:
index- The index to set the value at.value- The floatVal to set.- Returns:
- This builder for chaining.
-
addFloatVal
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Parameters:
value- The floatVal to add.- Returns:
- This builder for chaining.
-
addAllFloatVal
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Parameters:
values- The floatVal to add.- Returns:
- This builder for chaining.
-
clearFloatVal
DT_FLOAT.
repeated float float_val = 5 [packed = true];- Returns:
- This builder for chaining.
-
getDoubleValList
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Specified by:
getDoubleValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the doubleVal.
-
getDoubleValCount
public int getDoubleValCount()DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Specified by:
getDoubleValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of doubleVal.
-
getDoubleVal
public double getDoubleVal(int index) DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Specified by:
getDoubleValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The doubleVal at the given index.
-
setDoubleVal
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Parameters:
index- The index to set the value at.value- The doubleVal to set.- Returns:
- This builder for chaining.
-
addDoubleVal
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Parameters:
value- The doubleVal to add.- Returns:
- This builder for chaining.
-
addAllDoubleVal
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Parameters:
values- The doubleVal to add.- Returns:
- This builder for chaining.
-
clearDoubleVal
DT_DOUBLE.
repeated double double_val = 6 [packed = true];- Returns:
- This builder for chaining.
-
getIntValList
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Specified by:
getIntValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the intVal.
-
getIntValCount
public int getIntValCount()DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Specified by:
getIntValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of intVal.
-
getIntVal
public int getIntVal(int index) DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Specified by:
getIntValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The intVal at the given index.
-
setIntVal
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Parameters:
index- The index to set the value at.value- The intVal to set.- Returns:
- This builder for chaining.
-
addIntVal
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Parameters:
value- The intVal to add.- Returns:
- This builder for chaining.
-
addAllIntVal
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Parameters:
values- The intVal to add.- Returns:
- This builder for chaining.
-
clearIntVal
DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8.
repeated int32 int_val = 7 [packed = true];- Returns:
- This builder for chaining.
-
getStringValList
DT_STRING
repeated bytes string_val = 8;- Specified by:
getStringValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the stringVal.
-
getStringValCount
public int getStringValCount()DT_STRING
repeated bytes string_val = 8;- Specified by:
getStringValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of stringVal.
-
getStringVal
public com.google.protobuf.ByteString getStringVal(int index) DT_STRING
repeated bytes string_val = 8;- Specified by:
getStringValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The stringVal at the given index.
-
setStringVal
DT_STRING
repeated bytes string_val = 8;- Parameters:
index- The index to set the value at.value- The stringVal to set.- Returns:
- This builder for chaining.
-
addStringVal
DT_STRING
repeated bytes string_val = 8;- Parameters:
value- The stringVal to add.- Returns:
- This builder for chaining.
-
addAllStringVal
public TensorProto.Builder addAllStringVal(Iterable<? extends com.google.protobuf.ByteString> values) DT_STRING
repeated bytes string_val = 8;- Parameters:
values- The stringVal to add.- Returns:
- This builder for chaining.
-
clearStringVal
DT_STRING
repeated bytes string_val = 8;- Returns:
- This builder for chaining.
-
getScomplexValList
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Specified by:
getScomplexValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the scomplexVal.
-
getScomplexValCount
public int getScomplexValCount()DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Specified by:
getScomplexValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of scomplexVal.
-
getScomplexVal
public float getScomplexVal(int index) DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Specified by:
getScomplexValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The scomplexVal at the given index.
-
setScomplexVal
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Parameters:
index- The index to set the value at.value- The scomplexVal to set.- Returns:
- This builder for chaining.
-
addScomplexVal
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Parameters:
value- The scomplexVal to add.- Returns:
- This builder for chaining.
-
addAllScomplexVal
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Parameters:
values- The scomplexVal to add.- Returns:
- This builder for chaining.
-
clearScomplexVal
DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex.
repeated float scomplex_val = 9 [packed = true];- Returns:
- This builder for chaining.
-
getInt64ValList
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Specified by:
getInt64ValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the int64Val.
-
getInt64ValCount
public int getInt64ValCount()DT_INT64
repeated int64 int64_val = 10 [packed = true];- Specified by:
getInt64ValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of int64Val.
-
getInt64Val
public long getInt64Val(int index) DT_INT64
repeated int64 int64_val = 10 [packed = true];- Specified by:
getInt64Valin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The int64Val at the given index.
-
setInt64Val
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Parameters:
index- The index to set the value at.value- The int64Val to set.- Returns:
- This builder for chaining.
-
addInt64Val
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Parameters:
value- The int64Val to add.- Returns:
- This builder for chaining.
-
addAllInt64Val
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Parameters:
values- The int64Val to add.- Returns:
- This builder for chaining.
-
clearInt64Val
DT_INT64
repeated int64 int64_val = 10 [packed = true];- Returns:
- This builder for chaining.
-
getBoolValList
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Specified by:
getBoolValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the boolVal.
-
getBoolValCount
public int getBoolValCount()DT_BOOL
repeated bool bool_val = 11 [packed = true];- Specified by:
getBoolValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of boolVal.
-
getBoolVal
public boolean getBoolVal(int index) DT_BOOL
repeated bool bool_val = 11 [packed = true];- Specified by:
getBoolValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The boolVal at the given index.
-
setBoolVal
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Parameters:
index- The index to set the value at.value- The boolVal to set.- Returns:
- This builder for chaining.
-
addBoolVal
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Parameters:
value- The boolVal to add.- Returns:
- This builder for chaining.
-
addAllBoolVal
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Parameters:
values- The boolVal to add.- Returns:
- This builder for chaining.
-
clearBoolVal
DT_BOOL
repeated bool bool_val = 11 [packed = true];- Returns:
- This builder for chaining.
-
getDcomplexValList
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Specified by:
getDcomplexValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the dcomplexVal.
-
getDcomplexValCount
public int getDcomplexValCount()DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Specified by:
getDcomplexValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of dcomplexVal.
-
getDcomplexVal
public double getDcomplexVal(int index) DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Specified by:
getDcomplexValin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The dcomplexVal at the given index.
-
setDcomplexVal
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Parameters:
index- The index to set the value at.value- The dcomplexVal to set.- Returns:
- This builder for chaining.
-
addDcomplexVal
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Parameters:
value- The dcomplexVal to add.- Returns:
- This builder for chaining.
-
addAllDcomplexVal
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Parameters:
values- The dcomplexVal to add.- Returns:
- This builder for chaining.
-
clearDcomplexVal
DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex.
repeated double dcomplex_val = 12 [packed = true];- Returns:
- This builder for chaining.
-
getResourceHandleValList
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;- Specified by:
getResourceHandleValListin interfaceTensorProtoOrBuilder
-
getResourceHandleValCount
public int getResourceHandleValCount()DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;- Specified by:
getResourceHandleValCountin interfaceTensorProtoOrBuilder
-
getResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;- Specified by:
getResourceHandleValin interfaceTensorProtoOrBuilder
-
setResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
setResourceHandleVal
public TensorProto.Builder setResourceHandleVal(int index, ResourceHandleProto.Builder builderForValue) DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addResourceHandleVal
public TensorProto.Builder addResourceHandleVal(int index, ResourceHandleProto.Builder builderForValue) DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addAllResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
clearResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
removeResourceHandleVal
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValBuilder
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValOrBuilder
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;- Specified by:
getResourceHandleValOrBuilderin interfaceTensorProtoOrBuilder
-
getResourceHandleValOrBuilderList
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14;- Specified by:
getResourceHandleValOrBuilderListin interfaceTensorProtoOrBuilder
-
addResourceHandleValBuilder
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
addResourceHandleValBuilder
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getResourceHandleValBuilderList
DT_RESOURCE
repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; -
getVariantValList
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15;- Specified by:
getVariantValListin interfaceTensorProtoOrBuilder
-
getVariantValCount
public int getVariantValCount()DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15;- Specified by:
getVariantValCountin interfaceTensorProtoOrBuilder
-
getVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15;- Specified by:
getVariantValin interfaceTensorProtoOrBuilder
-
setVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
setVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addAllVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
clearVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
removeVariantVal
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValBuilder
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValOrBuilder
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15;- Specified by:
getVariantValOrBuilderin interfaceTensorProtoOrBuilder
-
getVariantValOrBuilderList
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15;- Specified by:
getVariantValOrBuilderListin interfaceTensorProtoOrBuilder
-
addVariantValBuilder
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
addVariantValBuilder
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getVariantValBuilderList
DT_VARIANT
repeated .tensorflow.VariantTensorDataProto variant_val = 15; -
getUint32ValList
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Specified by:
getUint32ValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the uint32Val.
-
getUint32ValCount
public int getUint32ValCount()DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Specified by:
getUint32ValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of uint32Val.
-
getUint32Val
public int getUint32Val(int index) DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Specified by:
getUint32Valin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The uint32Val at the given index.
-
setUint32Val
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Parameters:
index- The index to set the value at.value- The uint32Val to set.- Returns:
- This builder for chaining.
-
addUint32Val
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Parameters:
value- The uint32Val to add.- Returns:
- This builder for chaining.
-
addAllUint32Val
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Parameters:
values- The uint32Val to add.- Returns:
- This builder for chaining.
-
clearUint32Val
DT_UINT32
repeated uint32 uint32_val = 16 [packed = true];- Returns:
- This builder for chaining.
-
getUint64ValList
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Specified by:
getUint64ValListin interfaceTensorProtoOrBuilder- Returns:
- A list containing the uint64Val.
-
getUint64ValCount
public int getUint64ValCount()DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Specified by:
getUint64ValCountin interfaceTensorProtoOrBuilder- Returns:
- The count of uint64Val.
-
getUint64Val
public long getUint64Val(int index) DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Specified by:
getUint64Valin interfaceTensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The uint64Val at the given index.
-
setUint64Val
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Parameters:
index- The index to set the value at.value- The uint64Val to set.- Returns:
- This builder for chaining.
-
addUint64Val
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Parameters:
value- The uint64Val to add.- Returns:
- This builder for chaining.
-
addAllUint64Val
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Parameters:
values- The uint64Val to add.- Returns:
- This builder for chaining.
-
clearUint64Val
DT_UINT64
repeated uint64 uint64_val = 17 [packed = true];- Returns:
- This builder for chaining.
-
getFloat8Val
public com.google.protobuf.ByteString getFloat8Val()DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).
bytes float8_val = 18;- Specified by:
getFloat8Valin interfaceTensorProtoOrBuilder- Returns:
- The float8Val.
-
setFloat8Val
DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).
bytes float8_val = 18;- Parameters:
value- The float8Val to set.- Returns:
- This builder for chaining.
-
clearFloat8Val
DT_FLOAT8_*, use variable-sized set of bytes (i.e. the equivalent of repeated uint8, if such a thing existed).
bytes float8_val = 18;- Returns:
- This builder for chaining.
-
setUnknownFields
public final TensorProto.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
-
mergeUnknownFields
public final TensorProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TensorProto.Builder>
-