Package ai.onnx.proto
Class OnnxMl.TensorProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
ai.onnx.proto.OnnxMl.TensorProto.Builder
- All Implemented Interfaces:
OnnxMl.TensorProtoOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- OnnxMl.TensorProto
public static final class OnnxMl.TensorProto.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
implements OnnxMl.TensorProtoOrBuilder
Tensors A serialized tensor value.Protobuf type
onnx.TensorProto
-
Method Summary
Modifier and TypeMethodDescriptionaddAllDims
(Iterable<? extends Long> values) The shape of the tensor.addAllDoubleData
(Iterable<? extends Double> values) For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.addAllExternalData
(Iterable<? extends OnnxMl.StringStringEntryProto> values) Data can be stored inside the protobuf file using type-specific fields or raw_data.addAllFloatData
(Iterable<? extends Float> values) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.addAllInt32Data
(Iterable<? extends Integer> values) For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.addAllInt64Data
(Iterable<? extends Long> values) For int64.addAllStringData
(Iterable<? extends com.google.protobuf.ByteString> values) For strings.addAllUint64Data
(Iterable<? extends Long> values) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64addDims
(long value) The shape of the tensor.addDoubleData
(double value) For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.addExternalData
(int index, OnnxMl.StringStringEntryProto value) Data can be stored inside the protobuf file using type-specific fields or raw_data.addExternalData
(int index, OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data.Data can be stored inside the protobuf file using type-specific fields or raw_data.addExternalData
(OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data.Data can be stored inside the protobuf file using type-specific fields or raw_data.addExternalDataBuilder
(int index) Data can be stored inside the protobuf file using type-specific fields or raw_data.addFloatData
(float value) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.addInt32Data
(int value) For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.addInt64Data
(long value) For int64.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addStringData
(com.google.protobuf.ByteString value) For strings.addUint64Data
(long value) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64build()
clear()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.The data type of the tensor.The shape of the tensor.A human-readable documentation for this tensor.For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.Data can be stored inside the protobuf file using type-specific fields or raw_data.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.For int64.Optionally, a name for the tensor.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) Serializations can either use one of the fields above, or use this raw bytes field.optional .onnx.TensorProto.Segment segment = 3;
For strings.For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64clone()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.int
The data type of the tensor.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
long
getDims
(int index) The shape of the tensor.int
The shape of the tensor.The shape of the tensor.A human-readable documentation for this tensor.com.google.protobuf.ByteString
A human-readable documentation for this tensor.double
getDoubleData
(int index) For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.int
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.getExternalData
(int index) Data can be stored inside the protobuf file using type-specific fields or raw_data.getExternalDataBuilder
(int index) Data can be stored inside the protobuf file using type-specific fields or raw_data.Data can be stored inside the protobuf file using type-specific fields or raw_data.int
Data can be stored inside the protobuf file using type-specific fields or raw_data.Data can be stored inside the protobuf file using type-specific fields or raw_data.getExternalDataOrBuilder
(int index) Data can be stored inside the protobuf file using type-specific fields or raw_data.List<? extends OnnxMl.StringStringEntryProtoOrBuilder>
Data can be stored inside the protobuf file using type-specific fields or raw_data.float
getFloatData
(int index) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.int
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.int
getInt32Data
(int index) For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.int
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.long
getInt64Data
(int index) For int64.int
For int64.For int64.getName()
Optionally, a name for the tensor.com.google.protobuf.ByteString
Optionally, a name for the tensor.com.google.protobuf.ByteString
Serializations can either use one of the fields above, or use this raw bytes field.optional .onnx.TensorProto.Segment segment = 3;
optional .onnx.TensorProto.Segment segment = 3;
optional .onnx.TensorProto.Segment segment = 3;
com.google.protobuf.ByteString
getStringData
(int index) For strings.int
For strings.List<com.google.protobuf.ByteString>
For strings.long
getUint64Data
(int index) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64int
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64boolean
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.boolean
The data type of the tensor.boolean
A human-readable documentation for this tensor.boolean
hasName()
Optionally, a name for the tensor.boolean
Serializations can either use one of the fields above, or use this raw bytes field.boolean
optional .onnx.TensorProto.Segment segment = 3;
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(OnnxMl.TensorProto other) mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) optional .onnx.TensorProto.Segment segment = 3;
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeExternalData
(int index) Data can be stored inside the protobuf file using type-specific fields or raw_data.If value not set, data is stored in raw_data (if set) otherwise in type-specified field.setDataType
(int value) The data type of the tensor.setDims
(int index, long value) The shape of the tensor.setDocString
(String value) A human-readable documentation for this tensor.setDocStringBytes
(com.google.protobuf.ByteString value) A human-readable documentation for this tensor.setDoubleData
(int index, double value) For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.setExternalData
(int index, OnnxMl.StringStringEntryProto value) Data can be stored inside the protobuf file using type-specific fields or raw_data.setExternalData
(int index, OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data.setFloatData
(int index, float value) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.setInt32Data
(int index, int value) For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer.setInt64Data
(int index, long value) For int64.Optionally, a name for the tensor.setNameBytes
(com.google.protobuf.ByteString value) Optionally, a name for the tensor.setRawData
(com.google.protobuf.ByteString value) Serializations can either use one of the fields above, or use this raw bytes field.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) optional .onnx.TensorProto.Segment segment = 3;
setSegment
(OnnxMl.TensorProto.Segment.Builder builderForValue) optional .onnx.TensorProto.Segment segment = 3;
setStringData
(int index, com.google.protobuf.ByteString value) For strings.setUint64Data
(int index, long value) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.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, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
setField
public OnnxMl.TensorProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
setRepeatedField
public OnnxMl.TensorProto.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
addRepeatedField
public OnnxMl.TensorProto.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OnnxMl.TensorProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
mergeFrom
public OnnxMl.TensorProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OnnxMl.TensorProto.Builder>
- Throws:
IOException
-
getDimsList
The shape of the tensor.
repeated int64 dims = 1;
- Specified by:
getDimsList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the dims.
-
getDimsCount
public int getDimsCount()The shape of the tensor.
repeated int64 dims = 1;
- Specified by:
getDimsCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of dims.
-
getDims
public long getDims(int index) The shape of the tensor.
repeated int64 dims = 1;
- Specified by:
getDims
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The dims at the given index.
-
setDims
The shape of the tensor.
repeated int64 dims = 1;
- Parameters:
index
- The index to set the value at.value
- The dims to set.- Returns:
- This builder for chaining.
-
addDims
The shape of the tensor.
repeated int64 dims = 1;
- Parameters:
value
- The dims to add.- Returns:
- This builder for chaining.
-
addAllDims
The shape of the tensor.
repeated int64 dims = 1;
- Parameters:
values
- The dims to add.- Returns:
- This builder for chaining.
-
clearDims
The shape of the tensor.
repeated int64 dims = 1;
- Returns:
- This builder for chaining.
-
hasDataType
public boolean hasDataType()The data type of the tensor. This field MUST have a valid TensorProto.DataType value
optional int32 data_type = 2;
- Specified by:
hasDataType
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the dataType field is set.
-
getDataType
public int getDataType()The data type of the tensor. This field MUST have a valid TensorProto.DataType value
optional int32 data_type = 2;
- Specified by:
getDataType
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The dataType.
-
setDataType
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
optional int32 data_type = 2;
- Parameters:
value
- The dataType to set.- Returns:
- This builder for chaining.
-
clearDataType
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
optional int32 data_type = 2;
- Returns:
- This builder for chaining.
-
hasSegment
public boolean hasSegment()optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
hasSegment
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the segment field is set.
-
getSegment
optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
getSegment
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The segment.
-
setSegment
optional .onnx.TensorProto.Segment segment = 3;
-
setSegment
optional .onnx.TensorProto.Segment segment = 3;
-
mergeSegment
optional .onnx.TensorProto.Segment segment = 3;
-
clearSegment
optional .onnx.TensorProto.Segment segment = 3;
-
getSegmentBuilder
optional .onnx.TensorProto.Segment segment = 3;
-
getSegmentOrBuilder
optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
getSegmentOrBuilder
in interfaceOnnxMl.TensorProtoOrBuilder
-
getFloatDataList
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Specified by:
getFloatDataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the floatData.
-
getFloatDataCount
public int getFloatDataCount()For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Specified by:
getFloatDataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of floatData.
-
getFloatData
public float getFloatData(int index) For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Specified by:
getFloatData
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The floatData at the given index.
-
setFloatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Parameters:
index
- The index to set the value at.value
- The floatData to set.- Returns:
- This builder for chaining.
-
addFloatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Parameters:
value
- The floatData to add.- Returns:
- This builder for chaining.
-
addAllFloatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Parameters:
values
- The floatData to add.- Returns:
- This builder for chaining.
-
clearFloatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];
- Returns:
- This builder for chaining.
-
getInt32DataList
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32DataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the int32Data.
-
getInt32DataCount
public int getInt32DataCount()For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32DataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of int32Data.
-
getInt32Data
public int getInt32Data(int index) For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32Data
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The int32Data at the given index.
-
setInt32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Parameters:
index
- The index to set the value at.value
- The int32Data to set.- Returns:
- This builder for chaining.
-
addInt32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Parameters:
value
- The int32Data to add.- Returns:
- This builder for chaining.
-
addAllInt32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Parameters:
values
- The int32Data to add.- Returns:
- This builder for chaining.
-
clearInt32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
- Returns:
- This builder for chaining.
-
getStringDataList
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Specified by:
getStringDataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the stringData.
-
getStringDataCount
public int getStringDataCount()For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Specified by:
getStringDataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of stringData.
-
getStringData
public com.google.protobuf.ByteString getStringData(int index) For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Specified by:
getStringData
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The stringData at the given index.
-
setStringData
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Parameters:
index
- The index to set the value at.value
- The stringData to set.- Returns:
- This builder for chaining.
-
addStringData
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Parameters:
value
- The stringData to add.- Returns:
- This builder for chaining.
-
addAllStringData
public OnnxMl.TensorProto.Builder addAllStringData(Iterable<? extends com.google.protobuf.ByteString> values) For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Parameters:
values
- The stringData to add.- Returns:
- This builder for chaining.
-
clearStringData
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
- Returns:
- This builder for chaining.
-
getInt64DataList
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Specified by:
getInt64DataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the int64Data.
-
getInt64DataCount
public int getInt64DataCount()For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Specified by:
getInt64DataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of int64Data.
-
getInt64Data
public long getInt64Data(int index) For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Specified by:
getInt64Data
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The int64Data at the given index.
-
setInt64Data
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Parameters:
index
- The index to set the value at.value
- The int64Data to set.- Returns:
- This builder for chaining.
-
addInt64Data
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Parameters:
value
- The int64Data to add.- Returns:
- This builder for chaining.
-
addAllInt64Data
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Parameters:
values
- The int64Data to add.- Returns:
- This builder for chaining.
-
clearInt64Data
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
- Returns:
- This builder for chaining.
-
hasName
public boolean hasName()Optionally, a name for the tensor.
optional string name = 8;
- Specified by:
hasName
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the name field is set.
-
getName
Optionally, a name for the tensor.
optional string name = 8;
- Specified by:
getName
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Optionally, a name for the tensor.
optional string name = 8;
- Specified by:
getNameBytes
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The bytes for name.
-
setName
Optionally, a name for the tensor.
optional string name = 8;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
Optionally, a name for the tensor.
optional string name = 8;
- Returns:
- This builder for chaining.
-
setNameBytes
Optionally, a name for the tensor.
optional string name = 8;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasDocString
public boolean hasDocString()A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Specified by:
hasDocString
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the docString field is set.
-
getDocString
A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Specified by:
getDocString
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The docString.
-
getDocStringBytes
public com.google.protobuf.ByteString getDocStringBytes()A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Specified by:
getDocStringBytes
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The bytes for docString.
-
setDocString
A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Parameters:
value
- The docString to set.- Returns:
- This builder for chaining.
-
clearDocString
A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Returns:
- This builder for chaining.
-
setDocStringBytes
A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Parameters:
value
- The bytes for docString to set.- Returns:
- This builder for chaining.
-
hasRawData
public boolean hasRawData()Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
optional bytes raw_data = 9;
- Specified by:
hasRawData
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the rawData field is set.
-
getRawData
public com.google.protobuf.ByteString getRawData()Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
optional bytes raw_data = 9;
- Specified by:
getRawData
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The rawData.
-
setRawData
Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
optional bytes raw_data = 9;
- Parameters:
value
- The rawData to set.- Returns:
- This builder for chaining.
-
clearRawData
Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
optional bytes raw_data = 9;
- Returns:
- This builder for chaining.
-
getExternalDataList
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
- Specified by:
getExternalDataList
in interfaceOnnxMl.TensorProtoOrBuilder
-
getExternalDataCount
public int getExternalDataCount()Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
- Specified by:
getExternalDataCount
in interfaceOnnxMl.TensorProtoOrBuilder
-
getExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
- Specified by:
getExternalData
in interfaceOnnxMl.TensorProtoOrBuilder
-
setExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
setExternalData
public OnnxMl.TensorProto.Builder setExternalData(int index, OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addExternalData
public OnnxMl.TensorProto.Builder addExternalData(OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addExternalData
public OnnxMl.TensorProto.Builder addExternalData(int index, OnnxMl.StringStringEntryProto.Builder builderForValue) Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addAllExternalData
public OnnxMl.TensorProto.Builder addAllExternalData(Iterable<? extends OnnxMl.StringStringEntryProto> values) Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
clearExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
removeExternalData
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
getExternalDataBuilder
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
getExternalDataOrBuilder
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
- Specified by:
getExternalDataOrBuilder
in interfaceOnnxMl.TensorProtoOrBuilder
-
getExternalDataOrBuilderList
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
- Specified by:
getExternalDataOrBuilderList
in interfaceOnnxMl.TensorProtoOrBuilder
-
addExternalDataBuilder
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
addExternalDataBuilder
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
getExternalDataBuilderList
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
repeated .onnx.StringStringEntryProto external_data = 13;
-
hasDataLocation
public boolean hasDataLocation()If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
optional .onnx.TensorProto.DataLocation data_location = 14;
- Specified by:
hasDataLocation
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- Whether the dataLocation field is set.
-
getDataLocation
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
optional .onnx.TensorProto.DataLocation data_location = 14;
- Specified by:
getDataLocation
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The dataLocation.
-
setDataLocation
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
optional .onnx.TensorProto.DataLocation data_location = 14;
- Parameters:
value
- The dataLocation to set.- Returns:
- This builder for chaining.
-
clearDataLocation
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
optional .onnx.TensorProto.DataLocation data_location = 14;
- Returns:
- This builder for chaining.
-
getDoubleDataList
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Specified by:
getDoubleDataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the doubleData.
-
getDoubleDataCount
public int getDoubleDataCount()For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Specified by:
getDoubleDataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of doubleData.
-
getDoubleData
public double getDoubleData(int index) For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Specified by:
getDoubleData
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The doubleData at the given index.
-
setDoubleData
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Parameters:
index
- The index to set the value at.value
- The doubleData to set.- Returns:
- This builder for chaining.
-
addDoubleData
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Parameters:
value
- The doubleData to add.- Returns:
- This builder for chaining.
-
addAllDoubleData
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Parameters:
values
- The doubleData to add.- Returns:
- This builder for chaining.
-
clearDoubleData
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];
- Returns:
- This builder for chaining.
-
getUint64DataList
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Specified by:
getUint64DataList
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- A list containing the uint64Data.
-
getUint64DataCount
public int getUint64DataCount()For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Specified by:
getUint64DataCount
in interfaceOnnxMl.TensorProtoOrBuilder
- Returns:
- The count of uint64Data.
-
getUint64Data
public long getUint64Data(int index) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Specified by:
getUint64Data
in interfaceOnnxMl.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The uint64Data at the given index.
-
setUint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Parameters:
index
- The index to set the value at.value
- The uint64Data to set.- Returns:
- This builder for chaining.
-
addUint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Parameters:
value
- The uint64Data to add.- Returns:
- This builder for chaining.
-
addAllUint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Parameters:
values
- The uint64Data to add.- Returns:
- This builder for chaining.
-
clearUint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
- Returns:
- This builder for chaining.
-
setUnknownFields
public final OnnxMl.TensorProto.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-
mergeUnknownFields
public final OnnxMl.TensorProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.TensorProto.Builder>
-