public static final class TensorNamespace.TensorProto extends org.nd4j.shade.protobuf.GeneratedMessageV3 implements TensorNamespace.TensorProtoOrBuilder
Tensors A serialized tensor value.Protobuf type
org.nd4j.ir.TensorProto
Modifier and Type | Class and Description |
---|---|
static class |
TensorNamespace.TensorProto.Builder
Tensors
A serialized tensor value.
|
static class |
TensorNamespace.TensorProto.DataLocation
Location of the data for this tensor.
|
static class |
TensorNamespace.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 |
TensorNamespace.TensorProto.SegmentOrBuilder |
org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends org.nd4j.shade.protobuf.GeneratedMessageV3.ExtendableMessage>, org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable, org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
BOOL_VAL_FIELD_NUMBER |
static int |
DATA_LOCATION_FIELD_NUMBER |
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 |
EXTERNAL_DATA_FIELD_NUMBER |
static int |
FLOAT_DATA_FIELD_NUMBER |
static int |
HALF_VAL_FIELD_NUMBER |
static int |
INT32_DATA_FIELD_NUMBER |
static int |
INT64_DATA_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
RAW_DATA_FIELD_NUMBER |
static int |
SEGMENT_FIELD_NUMBER |
static int |
STRING_DATA_FIELD_NUMBER |
static int |
UINT64_DATA_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
getBoolVal(int index)
boolean values
|
int |
getBoolValCount()
boolean values
|
List<Boolean> |
getBoolValList()
boolean values
|
TensorNamespace.TensorProto.DataLocation |
getDataLocation()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
|
int |
getDataLocationValue()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
|
int |
getDataType()
The data type of the tensor.
|
static TensorNamespace.TensorProto |
getDefaultInstance() |
TensorNamespace.TensorProto |
getDefaultInstanceForType() |
static org.nd4j.shade.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.
|
org.nd4j.shade.protobuf.ByteString |
getDocStringBytes()
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 |
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.
|
List<Double> |
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.
|
TensorNamespace.StringStringEntryProto |
getExternalData(int index)
Data can be stored inside the protobuf file using type-specific fields or raw_data.
|
int |
getExternalDataCount()
Data can be stored inside the protobuf file using type-specific fields or raw_data.
|
List<TensorNamespace.StringStringEntryProto> |
getExternalDataList()
Data can be stored inside the protobuf file using type-specific fields or raw_data.
|
TensorNamespace.StringStringEntryProtoOrBuilder |
getExternalDataOrBuilder(int index)
Data can be stored inside the protobuf file using type-specific fields or raw_data.
|
List<? extends TensorNamespace.StringStringEntryProtoOrBuilder> |
getExternalDataOrBuilderList()
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 |
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.
|
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 appearing in the
subsequent even numbered position.
|
int |
getHalfVal(int index)
For half values (tensorflow compatibility)
|
int |
getHalfValCount()
For half values (tensorflow compatibility)
|
List<Integer> |
getHalfValList()
For half values (tensorflow compatibility)
|
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.Parser<TensorNamespace.TensorProto> |
getParserForType() |
org.nd4j.shade.protobuf.ByteString |
getRawData()
Serializations can either use one of the fields above, or use this
raw bytes field.
|
TensorNamespace.TensorProto.Segment |
getSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3; |
TensorNamespace.TensorProto.SegmentOrBuilder |
getSegmentOrBuilder()
.org.nd4j.ir.TensorProto.Segment segment = 3; |
int |
getSerializedSize() |
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
|
org.nd4j.shade.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3; |
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static TensorNamespace.TensorProto.Builder |
newBuilder() |
static TensorNamespace.TensorProto.Builder |
newBuilder(TensorNamespace.TensorProto prototype) |
TensorNamespace.TensorProto.Builder |
newBuilderForType() |
protected TensorNamespace.TensorProto.Builder |
newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static TensorNamespace.TensorProto |
parseDelimitedFrom(InputStream input) |
static TensorNamespace.TensorProto |
parseDelimitedFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static TensorNamespace.TensorProto |
parseFrom(byte[] data) |
static TensorNamespace.TensorProto |
parseFrom(byte[] data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static TensorNamespace.TensorProto |
parseFrom(ByteBuffer data) |
static TensorNamespace.TensorProto |
parseFrom(ByteBuffer data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static TensorNamespace.TensorProto |
parseFrom(org.nd4j.shade.protobuf.ByteString data) |
static TensorNamespace.TensorProto |
parseFrom(org.nd4j.shade.protobuf.ByteString data,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static TensorNamespace.TensorProto |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) |
static TensorNamespace.TensorProto |
parseFrom(org.nd4j.shade.protobuf.CodedInputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static TensorNamespace.TensorProto |
parseFrom(InputStream input) |
static TensorNamespace.TensorProto |
parseFrom(InputStream input,
org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) |
static org.nd4j.shade.protobuf.Parser<TensorNamespace.TensorProto> |
parser() |
TensorNamespace.TensorProto.Builder |
toBuilder() |
void |
writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, 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
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int DIMS_FIELD_NUMBER
public static final int DATA_TYPE_FIELD_NUMBER
public static final int SEGMENT_FIELD_NUMBER
public static final int FLOAT_DATA_FIELD_NUMBER
public static final int INT32_DATA_FIELD_NUMBER
public static final int STRING_DATA_FIELD_NUMBER
public static final int INT64_DATA_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int DOC_STRING_FIELD_NUMBER
public static final int RAW_DATA_FIELD_NUMBER
public static final int EXTERNAL_DATA_FIELD_NUMBER
public static final int DATA_LOCATION_FIELD_NUMBER
public static final int DOUBLE_DATA_FIELD_NUMBER
public static final int UINT64_DATA_FIELD_NUMBER
public static final int HALF_VAL_FIELD_NUMBER
public static final int BOOL_VAL_FIELD_NUMBER
protected Object newInstance(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface org.nd4j.shade.protobuf.MessageOrBuilder
getUnknownFields
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public List<Long> getDimsList()
The shape of the tensor.
repeated int64 dims = 1;
getDimsList
in interface TensorNamespace.TensorProtoOrBuilder
public int getDimsCount()
The shape of the tensor.
repeated int64 dims = 1;
getDimsCount
in interface TensorNamespace.TensorProtoOrBuilder
public long getDims(int index)
The shape of the tensor.
repeated int64 dims = 1;
getDims
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public int getDataType()
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
int32 data_type = 2;
getDataType
in interface TensorNamespace.TensorProtoOrBuilder
public boolean hasSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3;
hasSegment
in interface TensorNamespace.TensorProtoOrBuilder
public TensorNamespace.TensorProto.Segment getSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3;
getSegment
in interface TensorNamespace.TensorProtoOrBuilder
public TensorNamespace.TensorProto.SegmentOrBuilder getSegmentOrBuilder()
.org.nd4j.ir.TensorProto.Segment segment = 3;
getSegmentOrBuilder
in interface TensorNamespace.TensorProtoOrBuilder
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 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];
getFloatDataList
in interface TensorNamespace.TensorProtoOrBuilder
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];
getFloatDataCount
in interface TensorNamespace.TensorProtoOrBuilder
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];
getFloatData
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];
getInt32DataList
in interface TensorNamespace.TensorProtoOrBuilder
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];
getInt32DataCount
in interface TensorNamespace.TensorProtoOrBuilder
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];
getInt32Data
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public 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;
getStringDataList
in interface TensorNamespace.TensorProtoOrBuilder
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;
getStringDataCount
in interface TensorNamespace.TensorProtoOrBuilder
public 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;
getStringData
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.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];
getInt64DataList
in interface TensorNamespace.TensorProtoOrBuilder
public int getInt64DataCount()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
getInt64DataCount
in interface TensorNamespace.TensorProtoOrBuilder
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];
getInt64Data
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public String getName()
Optionally, a name for the tensor.
string name = 8;
getName
in interface TensorNamespace.TensorProtoOrBuilder
public org.nd4j.shade.protobuf.ByteString getNameBytes()
Optionally, a name for the tensor.
string name = 8;
getNameBytes
in interface TensorNamespace.TensorProtoOrBuilder
public String getDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
getDocString
in interface TensorNamespace.TensorProtoOrBuilder
public org.nd4j.shade.protobuf.ByteString getDocStringBytes()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
getDocStringBytes
in interface TensorNamespace.TensorProtoOrBuilder
public 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;
getRawData
in interface TensorNamespace.TensorProtoOrBuilder
public List<TensorNamespace.StringStringEntryProto> 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 .org.nd4j.ir.StringStringEntryProto external_data = 13;
getExternalDataList
in interface TensorNamespace.TensorProtoOrBuilder
public List<? extends TensorNamespace.StringStringEntryProtoOrBuilder> 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 .org.nd4j.ir.StringStringEntryProto external_data = 13;
getExternalDataOrBuilderList
in interface TensorNamespace.TensorProtoOrBuilder
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 .org.nd4j.ir.StringStringEntryProto external_data = 13;
getExternalDataCount
in interface TensorNamespace.TensorProtoOrBuilder
public TensorNamespace.StringStringEntryProto getExternalData(int index)
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 .org.nd4j.ir.StringStringEntryProto external_data = 13;
getExternalData
in interface TensorNamespace.TensorProtoOrBuilder
public TensorNamespace.StringStringEntryProtoOrBuilder getExternalDataOrBuilder(int index)
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 .org.nd4j.ir.StringStringEntryProto external_data = 13;
getExternalDataOrBuilder
in interface TensorNamespace.TensorProtoOrBuilder
public int getDataLocationValue()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
.org.nd4j.ir.TensorProto.DataLocation data_location = 14;
getDataLocationValue
in interface TensorNamespace.TensorProtoOrBuilder
public TensorNamespace.TensorProto.DataLocation getDataLocation()
If value not set, data is stored in raw_data (if set) otherwise in type-specified field.
.org.nd4j.ir.TensorProto.DataLocation data_location = 14;
getDataLocation
in interface TensorNamespace.TensorProtoOrBuilder
public List<Double> 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];
getDoubleDataList
in interface TensorNamespace.TensorProtoOrBuilder
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];
getDoubleDataCount
in interface TensorNamespace.TensorProtoOrBuilder
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];
getDoubleData
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.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];
getUint64DataList
in interface TensorNamespace.TensorProtoOrBuilder
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];
getUint64DataCount
in interface TensorNamespace.TensorProtoOrBuilder
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];
getUint64Data
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public List<Integer> getHalfValList()
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];
getHalfValList
in interface TensorNamespace.TensorProtoOrBuilder
public int getHalfValCount()
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];
getHalfValCount
in interface TensorNamespace.TensorProtoOrBuilder
public int getHalfVal(int index)
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];
getHalfVal
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public List<Boolean> getBoolValList()
boolean values
repeated bool bool_val = 16 [packed = true];
getBoolValList
in interface TensorNamespace.TensorProtoOrBuilder
public int getBoolValCount()
boolean values
repeated bool bool_val = 16 [packed = true];
getBoolValCount
in interface TensorNamespace.TensorProtoOrBuilder
public boolean getBoolVal(int index)
boolean values
repeated bool bool_val = 16 [packed = true];
getBoolVal
in interface TensorNamespace.TensorProtoOrBuilder
index
- The index of the element to return.public final boolean isInitialized()
isInitialized
in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
isInitialized
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public void writeTo(org.nd4j.shade.protobuf.CodedOutputStream output) throws IOException
writeTo
in interface org.nd4j.shade.protobuf.MessageLite
writeTo
in class org.nd4j.shade.protobuf.GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface org.nd4j.shade.protobuf.MessageLite
getSerializedSize
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface org.nd4j.shade.protobuf.Message
equals
in class org.nd4j.shade.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface org.nd4j.shade.protobuf.Message
hashCode
in class org.nd4j.shade.protobuf.AbstractMessage
public static TensorNamespace.TensorProto parseFrom(ByteBuffer data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(ByteBuffer data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(org.nd4j.shade.protobuf.ByteString data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(org.nd4j.shade.protobuf.ByteString data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(byte[] data) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(byte[] data, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
org.nd4j.shade.protobuf.InvalidProtocolBufferException
public static TensorNamespace.TensorProto parseFrom(InputStream input) throws IOException
IOException
public static TensorNamespace.TensorProto parseFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static TensorNamespace.TensorProto parseDelimitedFrom(InputStream input) throws IOException
IOException
public static TensorNamespace.TensorProto parseDelimitedFrom(InputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static TensorNamespace.TensorProto parseFrom(org.nd4j.shade.protobuf.CodedInputStream input) throws IOException
IOException
public static TensorNamespace.TensorProto parseFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public TensorNamespace.TensorProto.Builder newBuilderForType()
newBuilderForType
in interface org.nd4j.shade.protobuf.Message
newBuilderForType
in interface org.nd4j.shade.protobuf.MessageLite
public static TensorNamespace.TensorProto.Builder newBuilder()
public static TensorNamespace.TensorProto.Builder newBuilder(TensorNamespace.TensorProto prototype)
public TensorNamespace.TensorProto.Builder toBuilder()
toBuilder
in interface org.nd4j.shade.protobuf.Message
toBuilder
in interface org.nd4j.shade.protobuf.MessageLite
protected TensorNamespace.TensorProto.Builder newBuilderForType(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public static TensorNamespace.TensorProto getDefaultInstance()
public static org.nd4j.shade.protobuf.Parser<TensorNamespace.TensorProto> parser()
public org.nd4j.shade.protobuf.Parser<TensorNamespace.TensorProto> getParserForType()
getParserForType
in interface org.nd4j.shade.protobuf.Message
getParserForType
in interface org.nd4j.shade.protobuf.MessageLite
getParserForType
in class org.nd4j.shade.protobuf.GeneratedMessageV3
public TensorNamespace.TensorProto getDefaultInstanceForType()
getDefaultInstanceForType
in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface org.nd4j.shade.protobuf.MessageOrBuilder
Copyright © 2022. All rights reserved.