public static interface Onnx.TensorProtoOrBuilder
extends org.nd4j.shade.protobuf.MessageOrBuilder
Modifier and Type | Method and Description |
---|---|
Onnx.TensorProto.DataType |
getDataType()
The data type of the tensor.
|
int |
getDataTypeValue()
The data type of the tensor.
|
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.
|
org.nd4j.shade.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.
|
org.nd4j.shade.protobuf.ByteString |
getNameBytes()
Optionally, a name for the tensor.
|
org.nd4j.shade.protobuf.ByteString |
getRawData()
Serializations can either use one of the fields above, or use this
raw bytes field.
|
Onnx.TensorProto.Segment |
getSegment()
.onnx.TensorProto.Segment segment = 3; |
Onnx.TensorProto.SegmentOrBuilder |
getSegmentOrBuilder()
.onnx.TensorProto.Segment segment = 3; |
org.nd4j.shade.protobuf.ByteString |
getStringData(int index)
For strings.
|
int |
getStringDataCount()
For strings.
|
List<org.nd4j.shade.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 UINT64
|
int |
getUint64DataCount()
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
List<Long> |
getUint64DataList()
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
boolean |
hasSegment()
.onnx.TensorProto.Segment segment = 3; |
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
int getDimsCount()
The shape of the tensor.
repeated int64 dims = 1;
long getDims(int index)
The shape of the tensor.
repeated int64 dims = 1;
int getDataTypeValue()
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
Onnx.TensorProto.DataType getDataType()
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
boolean hasSegment()
.onnx.TensorProto.Segment segment = 3;
Onnx.TensorProto.Segment getSegment()
.onnx.TensorProto.Segment segment = 3;
Onnx.TensorProto.SegmentOrBuilder getSegmentOrBuilder()
.onnx.TensorProto.Segment segment = 3;
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];
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];
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];
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];
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];
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];
List<org.nd4j.shade.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;
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;
org.nd4j.shade.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;
List<Long> getInt64DataList()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
int getInt64DataCount()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
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];
String getName()
Optionally, a name for the tensor.
string name = 8;
org.nd4j.shade.protobuf.ByteString getNameBytes()
Optionally, a name for the tensor.
string name = 8;
String getDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
org.nd4j.shade.protobuf.ByteString getDocStringBytes()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
org.nd4j.shade.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
bytes raw_data = 9;
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];
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];
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];
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];
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];
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];
Copyright © 2021. All rights reserved.