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 typeonnx.TensorProto
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Onnx.TensorProto.Builder
Tensors A serialized tensor value.static class
Onnx.TensorProto.DataType
Protobuf enumonnx.TensorProto.DataType
static class
Onnx.TensorProto.Segment
For 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 interface
Onnx.TensorProto.SegmentOrBuilder
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
DATA_TYPE_FIELD_NUMBER
static int
DIMS_FIELD_NUMBER
static int
DOC_STRING_FIELD_NUMBER
static int
DOUBLE_DATA_FIELD_NUMBER
static int
FLOAT_DATA_FIELD_NUMBER
static int
INT32_DATA_FIELD_NUMBER
static int
INT64_DATA_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static com.google.protobuf.Parser<Onnx.TensorProto>
PARSER
Deprecated.static int
RAW_DATA_FIELD_NUMBER
static int
SEGMENT_FIELD_NUMBER
static int
STRING_DATA_FIELD_NUMBER
static int
UINT64_DATA_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Onnx.TensorProto.DataType
getDataType()
The data type of the tensor.static Onnx.TensorProto
getDefaultInstance()
Onnx.TensorProto
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
long
getDims(int index)
The shape of the tensor.int
getDimsCount()
The shape of the tensor.List<Long>
getDimsList()
The shape of the tensor.String
getDocString()
A human-readable documentation for this tensor.com.google.protobuf.ByteString
getDocStringBytes()
A human-readable documentation for this tensor.double
getDoubleData(int index)
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position.int
getDoubleDataCount()
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position.List<Double>
getDoubleDataList()
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position.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 apparing in the subsequent even numbered position.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 apparing in the subsequent even numbered position.List<Float>
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 apparing 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
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.List<Integer>
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.long
getInt64Data(int index)
For int64.int
getInt64DataCount()
For int64.List<Long>
getInt64DataList()
For int64.String
getName()
Optionally, a name for the tensor.com.google.protobuf.ByteString
getNameBytes()
Optionally, a name for the tensor.com.google.protobuf.Parser<Onnx.TensorProto>
getParserForType()
com.google.protobuf.ByteString
getRawData()
Serializations can either use one of the fields above, or use this raw bytes field.Onnx.TensorProto.Segment
getSegment()
optional .onnx.TensorProto.Segment segment = 3;
Onnx.TensorProto.SegmentOrBuilder
getSegmentOrBuilder()
optional .onnx.TensorProto.Segment segment = 3;
int
getSerializedSize()
com.google.protobuf.ByteString
getStringData(int index)
For strings.int
getStringDataCount()
For strings.List<com.google.protobuf.ByteString>
getStringDataList()
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
getUint64DataCount()
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64List<Long>
getUint64DataList()
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64com.google.protobuf.UnknownFieldSet
getUnknownFields()
boolean
hasDataType()
The data type of the tensor.boolean
hasDocString()
A human-readable documentation for this tensor.int
hashCode()
boolean
hasName()
Optionally, a name for the tensor.boolean
hasRawData()
Serializations can either use one of the fields above, or use this raw bytes field.boolean
hasSegment()
optional .onnx.TensorProto.Segment segment = 3;
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Onnx.TensorProto.Builder
newBuilder()
static Onnx.TensorProto.Builder
newBuilder(Onnx.TensorProto prototype)
Onnx.TensorProto.Builder
newBuilderForType()
protected Onnx.TensorProto.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Onnx.TensorProto
parseDelimitedFrom(InputStream input)
static Onnx.TensorProto
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Onnx.TensorProto
parseFrom(byte[] data)
static Onnx.TensorProto
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Onnx.TensorProto
parseFrom(com.google.protobuf.ByteString data)
static Onnx.TensorProto
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Onnx.TensorProto
parseFrom(com.google.protobuf.CodedInputStream input)
static Onnx.TensorProto
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Onnx.TensorProto
parseFrom(InputStream input)
static Onnx.TensorProto
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Onnx.TensorProto
parseFrom(ByteBuffer data)
static Onnx.TensorProto
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Onnx.TensorProto>
parser()
Onnx.TensorProto.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
DIMS_FIELD_NUMBER
public static final int DIMS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DATA_TYPE_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SEGMENT_FIELD_NUMBER
public static final int SEGMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FLOAT_DATA_FIELD_NUMBER
public static final int FLOAT_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INT32_DATA_FIELD_NUMBER
public static final int INT32_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STRING_DATA_FIELD_NUMBER
public static final int STRING_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INT64_DATA_FIELD_NUMBER
public static final int INT64_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOC_STRING_FIELD_NUMBER
public static final int DOC_STRING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RAW_DATA_FIELD_NUMBER
public static final int RAW_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DOUBLE_DATA_FIELD_NUMBER
public static final int DOUBLE_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UINT64_DATA_FIELD_NUMBER
public static final int UINT64_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<Onnx.TensorProto> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
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
-
getDimsList
public List<Long> getDimsList()
The shape of the tensor.
repeated int64 dims = 1;
- Specified by:
getDimsList
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- A list containing the dims.
-
getDimsCount
public int getDimsCount()
The shape of the tensor.
repeated int64 dims = 1;
- Specified by:
getDimsCount
in interfaceOnnx.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 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.
optional .onnx.TensorProto.DataType data_type = 2;
- Specified by:
hasDataType
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- Whether the dataType field is set.
-
getDataType
public Onnx.TensorProto.DataType getDataType()
The data type of the tensor.
optional .onnx.TensorProto.DataType data_type = 2;
- Specified by:
getDataType
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- The dataType.
-
hasSegment
public boolean hasSegment()
optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
hasSegment
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- Whether the segment field is set.
-
getSegment
public Onnx.TensorProto.Segment getSegment()
optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
getSegment
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- The segment.
-
getSegmentOrBuilder
public Onnx.TensorProto.SegmentOrBuilder getSegmentOrBuilder()
optional .onnx.TensorProto.Segment segment = 3;
- Specified by:
getSegmentOrBuilder
in interfaceOnnx.TensorProtoOrBuilder
-
getFloatDataList
public List<Float> 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 apparing 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 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 apparing 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 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 apparing 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 interfaceOnnx.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The floatData at the given index.
-
getInt32DataList
public List<Integer> 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, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32DataList
in interfaceOnnx.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, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32DataCount
in interfaceOnnx.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, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
- Specified by:
getInt32Data
in interfaceOnnx.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The int32Data at the given index.
-
getStringDataList
public List<com.google.protobuf.ByteString> 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 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:
getStringDataCount
in 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:
getStringData
in interfaceOnnx.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The stringData at the given index.
-
getInt64DataList
public List<Long> 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 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:
getInt64DataCount
in 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:
getInt64Data
in 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:
hasName
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- Whether the name field is set.
-
getName
public String getName()
Optionally, a name for the tensor.
optional string name = 8;
- Specified by:
getName
in interfaceOnnx.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 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:
hasDocString
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- Whether the docString field is set.
-
getDocString
public String getDocString()
A human-readable documentation for this tensor. Markdown is allowed.
optional string doc_string = 12;
- Specified by:
getDocString
in 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:
getDocStringBytes
in 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:
hasRawData
in 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:
getRawData
in interfaceOnnx.TensorProtoOrBuilder
- Returns:
- The rawData.
-
getDoubleDataList
public List<Double> getDoubleDataList()
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing 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 interfaceOnnx.TensorProtoOrBuilder
- Returns:
- A list containing the doubleData.
-
getDoubleDataCount
public int getDoubleDataCount()
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing 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 interfaceOnnx.TensorProtoOrBuilder
- Returns:
- The count of doubleData.
-
getDoubleData
public double getDoubleData(int index)
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing 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 interfaceOnnx.TensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The doubleData at the given index.
-
getUint64DataList
public List<Long> 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 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:
getUint64DataCount
in 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:
getUint64Data
in 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:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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
public static Onnx.TensorProto parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Onnx.TensorProto parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Onnx.TensorProto parseDelimitedFrom(InputStream input) throws IOException
- 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
public Onnx.TensorProto.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Onnx.TensorProto.Builder newBuilder()
-
newBuilder
public static Onnx.TensorProto.Builder newBuilder(Onnx.TensorProto prototype)
-
toBuilder
public Onnx.TensorProto.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Onnx.TensorProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Onnx.TensorProto getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Onnx.TensorProto> parser()
-
getParserForType
public com.google.protobuf.Parser<Onnx.TensorProto> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Onnx.TensorProto getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-