Package onnx
Class Onnx.TensorProto
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
onnx.Onnx.TensorProto
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,Onnx.TensorProtoOrBuilder
- Enclosing class:
- Onnx
public static final class Onnx.TensorProto
extends com.google.protobuf.GeneratedMessageV3
implements Onnx.TensorProtoOrBuilder
Tensors A serialized tensor value.Protobuf type
onnx.TensorProto- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classTensors A serialized tensor value.static enumLocation of the data for this tensor.static enumProtobuf enumonnx.TensorProto.DataTypestatic final classFor very large tensors, we may want to store them in chunks, in which case the following fields will specify the segment that is stored in the current TensorProto.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final com.google.protobuf.Parser<Onnx.TensorProto>Deprecated.static final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf value not set, data is stored in raw_data (if set) otherwise in type-specified field.intThe data type of the tensor.static Onnx.TensorProtostatic final com.google.protobuf.Descriptors.DescriptorlonggetDims(int index) The shape of the tensor.intThe shape of the tensor.The shape of the tensor.A human-readable documentation for this tensor.com.google.protobuf.ByteStringA human-readable documentation for this tensor.doublegetDoubleData(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.intFor 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.intData 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 Onnx.StringStringEntryProtoOrBuilder>Data can be stored inside the protobuf file using type-specific fields or raw_data.floatgetFloatData(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.intFor 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.intgetInt32Data(int index) For int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 values must be bit-wise converted to an uint16_t prior to writing to the buffer.intFor int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 values must be bit-wise converted to an uint16_t prior to writing to the buffer.For int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 values must be bit-wise converted to an uint16_t prior to writing to the buffer.longgetInt64Data(int index) For int64.intFor int64.For int64.getName()Optionally, a name for the tensor.com.google.protobuf.ByteStringOptionally, a name for the tensor.com.google.protobuf.Parser<Onnx.TensorProto>com.google.protobuf.ByteStringSerializations 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;intcom.google.protobuf.ByteStringgetStringData(int index) For strings.intFor strings.List<com.google.protobuf.ByteString>For strings.longgetUint64Data(int index) For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64intFor 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 UINT64booleanIf value not set, data is stored in raw_data (if set) otherwise in type-specified field.booleanThe data type of the tensor.booleanA human-readable documentation for this tensor.inthashCode()booleanhasName()Optionally, a name for the tensor.booleanSerializations can either use one of the fields above, or use this raw bytes field.booleanoptional .onnx.TensorProto.Segment segment = 3;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic Onnx.TensorProto.Builderstatic Onnx.TensorProto.BuildernewBuilder(Onnx.TensorProto prototype) protected Onnx.TensorProto.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static Onnx.TensorProtoparseDelimitedFrom(InputStream input) static Onnx.TensorProtoparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Onnx.TensorProtoparseFrom(byte[] data) static Onnx.TensorProtoparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Onnx.TensorProtoparseFrom(com.google.protobuf.ByteString data) static Onnx.TensorProtoparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Onnx.TensorProtoparseFrom(com.google.protobuf.CodedInputStream input) static Onnx.TensorProtoparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Onnx.TensorProtoparseFrom(InputStream input) static Onnx.TensorProtoparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static Onnx.TensorProtoparseFrom(ByteBuffer data) static Onnx.TensorProtoparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Onnx.TensorProto>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
DIMS_FIELD_NUMBER
public static final int DIMS_FIELD_NUMBER- See Also:
-
DATA_TYPE_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER- See Also:
-
SEGMENT_FIELD_NUMBER
public static final int SEGMENT_FIELD_NUMBER- See Also:
-
FLOAT_DATA_FIELD_NUMBER
public static final int FLOAT_DATA_FIELD_NUMBER- See Also:
-
INT32_DATA_FIELD_NUMBER
public static final int INT32_DATA_FIELD_NUMBER- See Also:
-
STRING_DATA_FIELD_NUMBER
public static final int STRING_DATA_FIELD_NUMBER- See Also:
-
INT64_DATA_FIELD_NUMBER
public static final int INT64_DATA_FIELD_NUMBER- See Also:
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
DOC_STRING_FIELD_NUMBER
public static final int DOC_STRING_FIELD_NUMBER- See Also:
-
RAW_DATA_FIELD_NUMBER
public static final int RAW_DATA_FIELD_NUMBER- See Also:
-
EXTERNAL_DATA_FIELD_NUMBER
public static final int EXTERNAL_DATA_FIELD_NUMBER- See Also:
-
DATA_LOCATION_FIELD_NUMBER
public static final int DATA_LOCATION_FIELD_NUMBER- See Also:
-
DOUBLE_DATA_FIELD_NUMBER
public static final int DOUBLE_DATA_FIELD_NUMBER- See Also:
-
UINT64_DATA_FIELD_NUMBER
public static final int UINT64_DATA_FIELD_NUMBER- See Also:
-
PARSER
Deprecated.
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
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
-
getDimsList
The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsListin interfaceOnnx.TensorProtoOrBuilder- Returns:
- A list containing the dims.
-
getDimsCount
public int getDimsCount()The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsCountin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The count of dims.
-
getDims
public long getDims(int index) The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsin interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The dims at the given index.
-
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:
hasDataTypein interfaceOnnx.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:
getDataTypein interfaceOnnx.TensorProtoOrBuilder- Returns:
- The dataType.
-
hasSegment
public boolean hasSegment()optional .onnx.TensorProto.Segment segment = 3;- Specified by:
hasSegmentin interfaceOnnx.TensorProtoOrBuilder- Returns:
- Whether the segment field is set.
-
getSegment
optional .onnx.TensorProto.Segment segment = 3;- Specified by:
getSegmentin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The segment.
-
getSegmentOrBuilder
optional .onnx.TensorProto.Segment segment = 3;- Specified by:
getSegmentOrBuilderin interfaceOnnx.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:
getFloatDataListin interfaceOnnx.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:
getFloatDataCountin interfaceOnnx.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:
getFloatDatain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The floatData at the given index.
-
getInt32DataList
For int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 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, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32DataListin interfaceOnnx.TensorProtoOrBuilder- Returns:
- A list containing the int32Data.
-
getInt32DataCount
public int getInt32DataCount()For int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 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, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32DataCountin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The count of int32Data.
-
getInt32Data
public int getInt32Data(int index) For int32, uint8, int8, uint16, int16, bool, float8, and float16 values float16 and float8 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, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32Datain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The int32Data at the given index.
-
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:
getStringDataListin interfaceOnnx.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:
getStringDataCountin interfaceOnnx.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:
getStringDatain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The stringData at the given index.
-
getInt64DataList
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];- Specified by:
getInt64DataListin interfaceOnnx.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:
getInt64DataCountin interfaceOnnx.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:
getInt64Datain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The int64Data at the given index.
-
hasName
public boolean hasName()Optionally, a name for the tensor.
optional string name = 8;- Specified by:
hasNamein interfaceOnnx.TensorProtoOrBuilder- Returns:
- Whether the name field is set.
-
getName
Optionally, a name for the tensor.
optional string name = 8;- Specified by:
getNamein interfaceOnnx.TensorProtoOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Optionally, a name for the tensor.
optional string name = 8;- Specified by:
getNameBytesin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The bytes for name.
-
hasDocString
public boolean hasDocString()A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;- Specified by:
hasDocStringin interfaceOnnx.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:
getDocStringin interfaceOnnx.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:
getDocStringBytesin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The bytes for docString.
-
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:
hasRawDatain interfaceOnnx.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:
getRawDatain interfaceOnnx.TensorProtoOrBuilder- Returns:
- The rawData.
-
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:
getExternalDataListin interfaceOnnx.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:
getExternalDataOrBuilderListin interfaceOnnx.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:
getExternalDataCountin interfaceOnnx.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:
getExternalDatain interfaceOnnx.TensorProtoOrBuilder
-
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:
getExternalDataOrBuilderin interfaceOnnx.TensorProtoOrBuilder
-
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:
hasDataLocationin interfaceOnnx.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:
getDataLocationin interfaceOnnx.TensorProtoOrBuilder- Returns:
- The dataLocation.
-
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:
getDoubleDataListin interfaceOnnx.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:
getDoubleDataCountin interfaceOnnx.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:
getDoubleDatain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The doubleData at the given index.
-
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:
getUint64DataListin interfaceOnnx.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:
getUint64DataCountin interfaceOnnx.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:
getUint64Datain interfaceOnnx.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The uint64Data at the given index.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Onnx.TensorProto parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Onnx.TensorProto parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Onnx.TensorProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Onnx.TensorProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Onnx.TensorProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Onnx.TensorProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Onnx.TensorProto parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Onnx.TensorProto parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static Onnx.TensorProto parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static Onnx.TensorProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Onnx.TensorProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-