public static final class OnnxMlProto3.TensorProto.Builder extends com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder> implements OnnxMlProto3.TensorProtoOrBuilder
A message defined to store a tensor in its serialized format.Protobuf type
onnx.TensorProto
Modifier and Type | Method and Description |
---|---|
OnnxMlProto3.TensorProto.Builder |
addAllDims(Iterable<? extends Long> values)
The shape of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
addAllDoubleData(Iterable<? extends Double> values)
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.
|
OnnxMlProto3.TensorProto.Builder |
addAllFloatData(Iterable<? extends Float> values)
For float and complex64 values
Complex64 tensors are encoded as a single array of floats,
with the real components appearing in odd numbered positions,
and the corresponding imaginary component apparing in the
subsequent even numbered position.
|
OnnxMlProto3.TensorProto.Builder |
addAllInt32Data(Iterable<? extends Integer> values)
For int32, uint8, int8, uint16, int16, bool, and float16 values
float16 values must be bit-wise converted to an uint16_t prior
to writing to the buffer.
|
OnnxMlProto3.TensorProto.Builder |
addAllInt64Data(Iterable<? extends Long> values)
For int64.
|
OnnxMlProto3.TensorProto.Builder |
addAllStringData(Iterable<? extends com.github.os72.protobuf351.ByteString> values)
For strings.
|
OnnxMlProto3.TensorProto.Builder |
addAllUint64Data(Iterable<? extends Long> values)
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
OnnxMlProto3.TensorProto.Builder |
addDims(long value)
The shape of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
addDoubleData(double value)
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.
|
OnnxMlProto3.TensorProto.Builder |
addFloatData(float value)
For float and complex64 values
Complex64 tensors are encoded as a single array of floats,
with the real components appearing in odd numbered positions,
and the corresponding imaginary component apparing in the
subsequent even numbered position.
|
OnnxMlProto3.TensorProto.Builder |
addInt32Data(int value)
For int32, uint8, int8, uint16, int16, bool, and float16 values
float16 values must be bit-wise converted to an uint16_t prior
to writing to the buffer.
|
OnnxMlProto3.TensorProto.Builder |
addInt64Data(long value)
For int64.
|
OnnxMlProto3.TensorProto.Builder |
addRepeatedField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
Object value) |
OnnxMlProto3.TensorProto.Builder |
addStringData(com.github.os72.protobuf351.ByteString value)
For strings.
|
OnnxMlProto3.TensorProto.Builder |
addUint64Data(long value)
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
OnnxMlProto3.TensorProto |
build() |
OnnxMlProto3.TensorProto |
buildPartial() |
OnnxMlProto3.TensorProto.Builder |
clear() |
OnnxMlProto3.TensorProto.Builder |
clearDataType()
The data type of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
clearDims()
The shape of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
clearDocString()
A human-readable documentation for this tensor.
|
OnnxMlProto3.TensorProto.Builder |
clearDoubleData()
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.
|
OnnxMlProto3.TensorProto.Builder |
clearField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field) |
OnnxMlProto3.TensorProto.Builder |
clearFloatData()
For float and complex64 values
Complex64 tensors are encoded as a single array of floats,
with the real components appearing in odd numbered positions,
and the corresponding imaginary component apparing in the
subsequent even numbered position.
|
OnnxMlProto3.TensorProto.Builder |
clearInt32Data()
For int32, uint8, int8, uint16, int16, bool, and float16 values
float16 values must be bit-wise converted to an uint16_t prior
to writing to the buffer.
|
OnnxMlProto3.TensorProto.Builder |
clearInt64Data()
For int64.
|
OnnxMlProto3.TensorProto.Builder |
clearName()
Optionally, a name for the tensor.
|
OnnxMlProto3.TensorProto.Builder |
clearOneof(com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof) |
OnnxMlProto3.TensorProto.Builder |
clearRawData()
Serializations can either use one of the fields above, or use this
raw bytes field.
|
OnnxMlProto3.TensorProto.Builder |
clearSegment()
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.Builder |
clearStringData()
For strings.
|
OnnxMlProto3.TensorProto.Builder |
clearUint64Data()
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
OnnxMlProto3.TensorProto.Builder |
clone() |
OnnxMlProto3.TensorProto.DataType |
getDataType()
The data type of the tensor.
|
int |
getDataTypeValue()
The data type of the tensor.
|
OnnxMlProto3.TensorProto |
getDefaultInstanceForType() |
static com.github.os72.protobuf351.Descriptors.Descriptor |
getDescriptor() |
com.github.os72.protobuf351.Descriptors.Descriptor |
getDescriptorForType() |
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.github.os72.protobuf351.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.github.os72.protobuf351.ByteString |
getNameBytes()
Optionally, a name for the tensor.
|
com.github.os72.protobuf351.ByteString |
getRawData()
Serializations can either use one of the fields above, or use this
raw bytes field.
|
OnnxMlProto3.TensorProto.Segment |
getSegment()
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.Segment.Builder |
getSegmentBuilder()
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.SegmentOrBuilder |
getSegmentOrBuilder()
.onnx.TensorProto.Segment segment = 3; |
com.github.os72.protobuf351.ByteString |
getStringData(int index)
For strings.
|
int |
getStringDataCount()
For strings.
|
List<com.github.os72.protobuf351.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; |
protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
OnnxMlProto3.TensorProto.Builder |
mergeFrom(com.github.os72.protobuf351.CodedInputStream input,
com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) |
OnnxMlProto3.TensorProto.Builder |
mergeFrom(com.github.os72.protobuf351.Message other) |
OnnxMlProto3.TensorProto.Builder |
mergeFrom(OnnxMlProto3.TensorProto other) |
OnnxMlProto3.TensorProto.Builder |
mergeSegment(OnnxMlProto3.TensorProto.Segment value)
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.Builder |
mergeUnknownFields(com.github.os72.protobuf351.UnknownFieldSet unknownFields) |
OnnxMlProto3.TensorProto.Builder |
setDataType(OnnxMlProto3.TensorProto.DataType value)
The data type of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
setDataTypeValue(int value)
The data type of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
setDims(int index,
long value)
The shape of the tensor.
|
OnnxMlProto3.TensorProto.Builder |
setDocString(String value)
A human-readable documentation for this tensor.
|
OnnxMlProto3.TensorProto.Builder |
setDocStringBytes(com.github.os72.protobuf351.ByteString value)
A human-readable documentation for this tensor.
|
OnnxMlProto3.TensorProto.Builder |
setDoubleData(int index,
double value)
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.
|
OnnxMlProto3.TensorProto.Builder |
setField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
Object value) |
OnnxMlProto3.TensorProto.Builder |
setFloatData(int index,
float value)
For float and complex64 values
Complex64 tensors are encoded as a single array of floats,
with the real components appearing in odd numbered positions,
and the corresponding imaginary component apparing in the
subsequent even numbered position.
|
OnnxMlProto3.TensorProto.Builder |
setInt32Data(int index,
int value)
For int32, uint8, int8, uint16, int16, bool, and float16 values
float16 values must be bit-wise converted to an uint16_t prior
to writing to the buffer.
|
OnnxMlProto3.TensorProto.Builder |
setInt64Data(int index,
long value)
For int64.
|
OnnxMlProto3.TensorProto.Builder |
setName(String value)
Optionally, a name for the tensor.
|
OnnxMlProto3.TensorProto.Builder |
setNameBytes(com.github.os72.protobuf351.ByteString value)
Optionally, a name for the tensor.
|
OnnxMlProto3.TensorProto.Builder |
setRawData(com.github.os72.protobuf351.ByteString value)
Serializations can either use one of the fields above, or use this
raw bytes field.
|
OnnxMlProto3.TensorProto.Builder |
setRepeatedField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field,
int index,
Object value) |
OnnxMlProto3.TensorProto.Builder |
setSegment(OnnxMlProto3.TensorProto.Segment.Builder builderForValue)
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.Builder |
setSegment(OnnxMlProto3.TensorProto.Segment value)
.onnx.TensorProto.Segment segment = 3; |
OnnxMlProto3.TensorProto.Builder |
setStringData(int index,
com.github.os72.protobuf351.ByteString value)
For strings.
|
OnnxMlProto3.TensorProto.Builder |
setUint64Data(int index,
long value)
For uint64 and uint32 values
When this field is present, the data_type field MUST be
UINT32 or UINT64
|
OnnxMlProto3.TensorProto.Builder |
setUnknownFields(com.github.os72.protobuf351.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor()
protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder clear()
clear
in interface com.github.os72.protobuf351.Message.Builder
clear
in interface com.github.os72.protobuf351.MessageLite.Builder
clear
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public com.github.os72.protobuf351.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.github.os72.protobuf351.Message.Builder
getDescriptorForType
in interface com.github.os72.protobuf351.MessageOrBuilder
getDescriptorForType
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.github.os72.protobuf351.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.github.os72.protobuf351.MessageOrBuilder
public OnnxMlProto3.TensorProto build()
build
in interface com.github.os72.protobuf351.Message.Builder
build
in interface com.github.os72.protobuf351.MessageLite.Builder
public OnnxMlProto3.TensorProto buildPartial()
buildPartial
in interface com.github.os72.protobuf351.Message.Builder
buildPartial
in interface com.github.os72.protobuf351.MessageLite.Builder
public OnnxMlProto3.TensorProto.Builder clone()
clone
in interface com.github.os72.protobuf351.Message.Builder
clone
in interface com.github.os72.protobuf351.MessageLite.Builder
clone
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder setField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.github.os72.protobuf351.Message.Builder
setField
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder clearField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field)
clearField
in interface com.github.os72.protobuf351.Message.Builder
clearField
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder clearOneof(com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.github.os72.protobuf351.Message.Builder
clearOneof
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder setRepeatedField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.github.os72.protobuf351.Message.Builder
setRepeatedField
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder addRepeatedField(com.github.os72.protobuf351.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.github.os72.protobuf351.Message.Builder
addRepeatedField
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder mergeFrom(com.github.os72.protobuf351.Message other)
mergeFrom
in interface com.github.os72.protobuf351.Message.Builder
mergeFrom
in class com.github.os72.protobuf351.AbstractMessage.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder mergeFrom(OnnxMlProto3.TensorProto other)
public final boolean isInitialized()
isInitialized
in interface com.github.os72.protobuf351.MessageLiteOrBuilder
isInitialized
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public OnnxMlProto3.TensorProto.Builder mergeFrom(com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.github.os72.protobuf351.Message.Builder
mergeFrom
in interface com.github.os72.protobuf351.MessageLite.Builder
mergeFrom
in class com.github.os72.protobuf351.AbstractMessage.Builder<OnnxMlProto3.TensorProto.Builder>
IOException
public List<Long> getDimsList()
The shape of the tensor.
repeated int64 dims = 1;
getDimsList
in interface OnnxMlProto3.TensorProtoOrBuilder
public int getDimsCount()
The shape of the tensor.
repeated int64 dims = 1;
getDimsCount
in interface OnnxMlProto3.TensorProtoOrBuilder
public long getDims(int index)
The shape of the tensor.
repeated int64 dims = 1;
getDims
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setDims(int index, long value)
The shape of the tensor.
repeated int64 dims = 1;
public OnnxMlProto3.TensorProto.Builder addDims(long value)
The shape of the tensor.
repeated int64 dims = 1;
public OnnxMlProto3.TensorProto.Builder addAllDims(Iterable<? extends Long> values)
The shape of the tensor.
repeated int64 dims = 1;
public OnnxMlProto3.TensorProto.Builder clearDims()
The shape of the tensor.
repeated int64 dims = 1;
public int getDataTypeValue()
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
getDataTypeValue
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setDataTypeValue(int value)
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
public OnnxMlProto3.TensorProto.DataType getDataType()
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
getDataType
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setDataType(OnnxMlProto3.TensorProto.DataType value)
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
public OnnxMlProto3.TensorProto.Builder clearDataType()
The data type of the tensor.
.onnx.TensorProto.DataType data_type = 2;
public boolean hasSegment()
.onnx.TensorProto.Segment segment = 3;
hasSegment
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Segment getSegment()
.onnx.TensorProto.Segment segment = 3;
getSegment
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setSegment(OnnxMlProto3.TensorProto.Segment value)
.onnx.TensorProto.Segment segment = 3;
public OnnxMlProto3.TensorProto.Builder setSegment(OnnxMlProto3.TensorProto.Segment.Builder builderForValue)
.onnx.TensorProto.Segment segment = 3;
public OnnxMlProto3.TensorProto.Builder mergeSegment(OnnxMlProto3.TensorProto.Segment value)
.onnx.TensorProto.Segment segment = 3;
public OnnxMlProto3.TensorProto.Builder clearSegment()
.onnx.TensorProto.Segment segment = 3;
public OnnxMlProto3.TensorProto.Segment.Builder getSegmentBuilder()
.onnx.TensorProto.Segment segment = 3;
public OnnxMlProto3.TensorProto.SegmentOrBuilder getSegmentOrBuilder()
.onnx.TensorProto.Segment segment = 3;
getSegmentOrBuilder
in interface OnnxMlProto3.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 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];
getFloatDataList
in interface OnnxMlProto3.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 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];
getFloatDataCount
in interface OnnxMlProto3.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 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];
getFloatData
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setFloatData(int index, float value)
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component 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];
public OnnxMlProto3.TensorProto.Builder addFloatData(float value)
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component 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];
public OnnxMlProto3.TensorProto.Builder addAllFloatData(Iterable<? extends Float> values)
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component 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];
public OnnxMlProto3.TensorProto.Builder clearFloatData()
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component 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];
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];
getInt32DataList
in interface OnnxMlProto3.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, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
getInt32DataCount
in interface OnnxMlProto3.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, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
getInt32Data
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setInt32Data(int index, int value)
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. 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];
public OnnxMlProto3.TensorProto.Builder addInt32Data(int value)
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. 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];
public OnnxMlProto3.TensorProto.Builder addAllInt32Data(Iterable<? extends Integer> values)
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. 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];
public OnnxMlProto3.TensorProto.Builder clearInt32Data()
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
repeated int32 int32_data = 5 [packed = true];
public List<com.github.os72.protobuf351.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 OnnxMlProto3.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 OnnxMlProto3.TensorProtoOrBuilder
public com.github.os72.protobuf351.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 OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setStringData(int index, com.github.os72.protobuf351.ByteString value)
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;
public OnnxMlProto3.TensorProto.Builder addStringData(com.github.os72.protobuf351.ByteString value)
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;
public OnnxMlProto3.TensorProto.Builder addAllStringData(Iterable<? extends com.github.os72.protobuf351.ByteString> values)
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
public OnnxMlProto3.TensorProto.Builder clearStringData()
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;
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 OnnxMlProto3.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 OnnxMlProto3.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 OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setInt64Data(int index, long value)
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
public OnnxMlProto3.TensorProto.Builder addInt64Data(long value)
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
public OnnxMlProto3.TensorProto.Builder addAllInt64Data(Iterable<? extends Long> values)
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
public OnnxMlProto3.TensorProto.Builder clearInt64Data()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];
public String getName()
Optionally, a name for the tensor.
string name = 8;
getName
in interface OnnxMlProto3.TensorProtoOrBuilder
public com.github.os72.protobuf351.ByteString getNameBytes()
Optionally, a name for the tensor.
string name = 8;
getNameBytes
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setName(String value)
Optionally, a name for the tensor.
string name = 8;
public OnnxMlProto3.TensorProto.Builder clearName()
Optionally, a name for the tensor.
string name = 8;
public OnnxMlProto3.TensorProto.Builder setNameBytes(com.github.os72.protobuf351.ByteString value)
Optionally, a name for the tensor.
string name = 8;
public String getDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
getDocString
in interface OnnxMlProto3.TensorProtoOrBuilder
public com.github.os72.protobuf351.ByteString getDocStringBytes()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
getDocStringBytes
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setDocString(String value)
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
public OnnxMlProto3.TensorProto.Builder clearDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
public OnnxMlProto3.TensorProto.Builder setDocStringBytes(com.github.os72.protobuf351.ByteString value)
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;
public com.github.os72.protobuf351.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 OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setRawData(com.github.os72.protobuf351.ByteString value)
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;
public OnnxMlProto3.TensorProto.Builder clearRawData()
Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
bytes raw_data = 9;
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];
getDoubleDataList
in interface OnnxMlProto3.TensorProtoOrBuilder
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];
getDoubleDataCount
in interface OnnxMlProto3.TensorProtoOrBuilder
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];
getDoubleData
in interface OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setDoubleData(int index, double value)
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];
public OnnxMlProto3.TensorProto.Builder addDoubleData(double value)
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];
public OnnxMlProto3.TensorProto.Builder addAllDoubleData(Iterable<? extends Double> values)
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];
public OnnxMlProto3.TensorProto.Builder clearDoubleData()
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];
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 OnnxMlProto3.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 OnnxMlProto3.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 OnnxMlProto3.TensorProtoOrBuilder
public OnnxMlProto3.TensorProto.Builder setUint64Data(int index, long value)
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];
public OnnxMlProto3.TensorProto.Builder addUint64Data(long value)
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];
public OnnxMlProto3.TensorProto.Builder addAllUint64Data(Iterable<? extends Long> values)
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];
public OnnxMlProto3.TensorProto.Builder clearUint64Data()
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];
public final OnnxMlProto3.TensorProto.Builder setUnknownFields(com.github.os72.protobuf351.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.github.os72.protobuf351.Message.Builder
setUnknownFields
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
public final OnnxMlProto3.TensorProto.Builder mergeUnknownFields(com.github.os72.protobuf351.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.github.os72.protobuf351.Message.Builder
mergeUnknownFields
in class com.github.os72.protobuf351.GeneratedMessageV3.Builder<OnnxMlProto3.TensorProto.Builder>
Copyright © 2019. All rights reserved.