Package org.nd4j.ir
Class TensorNamespace.TensorProto.Builder
- java.lang.Object
-
- org.nd4j.shade.protobuf.AbstractMessageLite.Builder
-
- org.nd4j.shade.protobuf.AbstractMessage.Builder<BuilderType>
-
- org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
- org.nd4j.ir.TensorNamespace.TensorProto.Builder
-
- All Implemented Interfaces:
Cloneable,TensorNamespace.TensorProtoOrBuilder,org.nd4j.shade.protobuf.Message.Builder,org.nd4j.shade.protobuf.MessageLite.Builder,org.nd4j.shade.protobuf.MessageLiteOrBuilder,org.nd4j.shade.protobuf.MessageOrBuilder
- Enclosing class:
- TensorNamespace.TensorProto
public static final class TensorNamespace.TensorProto.Builder extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder> implements TensorNamespace.TensorProtoOrBuilder
Tensors A serialized tensor value.
Protobuf typeorg.nd4j.ir.TensorProto
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TensorNamespace.TensorProto.BuilderaddAllBoolVal(Iterable<? extends Boolean> values)boolean valuesTensorNamespace.TensorProto.BuilderaddAllDims(Iterable<? extends Long> values)The shape of the tensor.TensorNamespace.TensorProto.BuilderaddAllDoubleData(Iterable<? extends Double> values)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.TensorProto.BuilderaddAllExternalData(Iterable<? extends TensorNamespace.StringStringEntryProto> values)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderaddAllFloatData(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 appearing in the subsequent even numbered position.TensorNamespace.TensorProto.BuilderaddAllHalfVal(Iterable<? extends Integer> values)For half values (tensorflow compatibility)TensorNamespace.TensorProto.BuilderaddAllInt32Data(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.TensorNamespace.TensorProto.BuilderaddAllInt64Data(Iterable<? extends Long> values)For int64.TensorNamespace.TensorProto.BuilderaddAllStringData(Iterable<? extends org.nd4j.shade.protobuf.ByteString> values)For strings.TensorNamespace.TensorProto.BuilderaddAllUint64Data(Iterable<? extends Long> values)For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64TensorNamespace.TensorProto.BuilderaddBoolVal(boolean value)boolean valuesTensorNamespace.TensorProto.BuilderaddDims(long value)The shape of the tensor.TensorNamespace.TensorProto.BuilderaddDoubleData(double value)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.TensorProto.BuilderaddExternalData(int index, TensorNamespace.StringStringEntryProto value)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderaddExternalData(int index, TensorNamespace.StringStringEntryProto.Builder builderForValue)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderaddExternalData(TensorNamespace.StringStringEntryProto value)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderaddExternalData(TensorNamespace.StringStringEntryProto.Builder builderForValue)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.StringStringEntryProto.BuilderaddExternalDataBuilder()Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.StringStringEntryProto.BuilderaddExternalDataBuilder(int index)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderaddFloatData(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 appearing in the subsequent even numbered position.TensorNamespace.TensorProto.BuilderaddHalfVal(int value)For half values (tensorflow compatibility)TensorNamespace.TensorProto.BuilderaddInt32Data(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.TensorNamespace.TensorProto.BuilderaddInt64Data(long value)For int64.TensorNamespace.TensorProto.BuilderaddRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)TensorNamespace.TensorProto.BuilderaddStringData(org.nd4j.shade.protobuf.ByteString value)For strings.TensorNamespace.TensorProto.BuilderaddUint64Data(long value)For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64TensorNamespace.TensorProtobuild()TensorNamespace.TensorProtobuildPartial()TensorNamespace.TensorProto.Builderclear()TensorNamespace.TensorProto.BuilderclearBoolVal()boolean valuesTensorNamespace.TensorProto.BuilderclearDataLocation()If value not set, data is stored in raw_data (if set) otherwise in type-specified field.TensorNamespace.TensorProto.BuilderclearDataType()The data type of the tensor.TensorNamespace.TensorProto.BuilderclearDims()The shape of the tensor.TensorNamespace.TensorProto.BuilderclearDocString()A human-readable documentation for this tensor.TensorNamespace.TensorProto.BuilderclearDoubleData()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.TensorProto.BuilderclearExternalData()Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuilderclearField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)TensorNamespace.TensorProto.BuilderclearFloatData()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.TensorNamespace.TensorProto.BuilderclearHalfVal()For half values (tensorflow compatibility)TensorNamespace.TensorProto.BuilderclearInt32Data()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.TensorNamespace.TensorProto.BuilderclearInt64Data()For int64.TensorNamespace.TensorProto.BuilderclearName()Optionally, a name for the tensor.TensorNamespace.TensorProto.BuilderclearOneof(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)TensorNamespace.TensorProto.BuilderclearRawData()Serializations can either use one of the fields above, or use this raw bytes field.TensorNamespace.TensorProto.BuilderclearSegment().org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.BuilderclearStringData()For strings.TensorNamespace.TensorProto.BuilderclearUint64Data()For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64TensorNamespace.TensorProto.Builderclone()booleangetBoolVal(int index)boolean valuesintgetBoolValCount()boolean valuesList<Boolean>getBoolValList()boolean valuesTensorNamespace.TensorProto.DataLocationgetDataLocation()If value not set, data is stored in raw_data (if set) otherwise in type-specified field.intgetDataLocationValue()If value not set, data is stored in raw_data (if set) otherwise in type-specified field.intgetDataType()The data type of the tensor.TensorNamespace.TensorProtogetDefaultInstanceForType()static org.nd4j.shade.protobuf.Descriptors.DescriptorgetDescriptor()org.nd4j.shade.protobuf.Descriptors.DescriptorgetDescriptorForType()longgetDims(int index)The shape of the tensor.intgetDimsCount()The shape of the tensor.List<Long>getDimsList()The shape of the tensor.StringgetDocString()A human-readable documentation for this tensor.org.nd4j.shade.protobuf.ByteStringgetDocStringBytes()A human-readable documentation for this tensor.doublegetDoubleData(int index)For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.intgetDoubleDataCount()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.StringStringEntryProtogetExternalData(int index)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.StringStringEntryProto.BuildergetExternalDataBuilder(int index)Data can be stored inside the protobuf file using type-specific fields or raw_data.List<TensorNamespace.StringStringEntryProto.Builder>getExternalDataBuilderList()Data can be stored inside the protobuf file using type-specific fields or raw_data.intgetExternalDataCount()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.StringStringEntryProtoOrBuildergetExternalDataOrBuilder(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.floatgetFloatData(int index)For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position.intgetFloatDataCount()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.intgetHalfVal(int index)For half values (tensorflow compatibility)intgetHalfValCount()For half values (tensorflow compatibility)List<Integer>getHalfValList()For half values (tensorflow compatibility)intgetInt32Data(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.intgetInt32DataCount()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.longgetInt64Data(int index)For int64.intgetInt64DataCount()For int64.List<Long>getInt64DataList()For int64.StringgetName()Optionally, a name for the tensor.org.nd4j.shade.protobuf.ByteStringgetNameBytes()Optionally, a name for the tensor.org.nd4j.shade.protobuf.ByteStringgetRawData()Serializations can either use one of the fields above, or use this raw bytes field.TensorNamespace.TensorProto.SegmentgetSegment().org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.Segment.BuildergetSegmentBuilder().org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.SegmentOrBuildergetSegmentOrBuilder().org.nd4j.ir.TensorProto.Segment segment = 3;org.nd4j.shade.protobuf.ByteStringgetStringData(int index)For strings.intgetStringDataCount()For strings.List<org.nd4j.shade.protobuf.ByteString>getStringDataList()For strings.longgetUint64Data(int index)For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64intgetUint64DataCount()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 UINT64booleanhasSegment().org.nd4j.ir.TensorProto.Segment segment = 3;protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TensorNamespace.TensorProto.BuildermergeFrom(TensorNamespace.TensorProto other)TensorNamespace.TensorProto.BuildermergeFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)TensorNamespace.TensorProto.BuildermergeFrom(org.nd4j.shade.protobuf.Message other)TensorNamespace.TensorProto.BuildermergeSegment(TensorNamespace.TensorProto.Segment value).org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.BuildermergeUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)TensorNamespace.TensorProto.BuilderremoveExternalData(int index)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuildersetBoolVal(int index, boolean value)boolean valuesTensorNamespace.TensorProto.BuildersetDataLocation(TensorNamespace.TensorProto.DataLocation value)If value not set, data is stored in raw_data (if set) otherwise in type-specified field.TensorNamespace.TensorProto.BuildersetDataLocationValue(int value)If value not set, data is stored in raw_data (if set) otherwise in type-specified field.TensorNamespace.TensorProto.BuildersetDataType(int value)The data type of the tensor.TensorNamespace.TensorProto.BuildersetDims(int index, long value)The shape of the tensor.TensorNamespace.TensorProto.BuildersetDocString(String value)A human-readable documentation for this tensor.TensorNamespace.TensorProto.BuildersetDocStringBytes(org.nd4j.shade.protobuf.ByteString value)A human-readable documentation for this tensor.TensorNamespace.TensorProto.BuildersetDoubleData(int index, double value)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.TensorProto.BuildersetExternalData(int index, TensorNamespace.StringStringEntryProto value)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuildersetExternalData(int index, TensorNamespace.StringStringEntryProto.Builder builderForValue)Data can be stored inside the protobuf file using type-specific fields or raw_data.TensorNamespace.TensorProto.BuildersetField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)TensorNamespace.TensorProto.BuildersetFloatData(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 appearing in the subsequent even numbered position.TensorNamespace.TensorProto.BuildersetHalfVal(int index, int value)For half values (tensorflow compatibility)TensorNamespace.TensorProto.BuildersetInt32Data(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.TensorNamespace.TensorProto.BuildersetInt64Data(int index, long value)For int64.TensorNamespace.TensorProto.BuildersetName(String value)Optionally, a name for the tensor.TensorNamespace.TensorProto.BuildersetNameBytes(org.nd4j.shade.protobuf.ByteString value)Optionally, a name for the tensor.TensorNamespace.TensorProto.BuildersetRawData(org.nd4j.shade.protobuf.ByteString value)Serializations can either use one of the fields above, or use this raw bytes field.TensorNamespace.TensorProto.BuildersetRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, int index, Object value)TensorNamespace.TensorProto.BuildersetSegment(TensorNamespace.TensorProto.Segment value).org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.BuildersetSegment(TensorNamespace.TensorProto.Segment.Builder builderForValue).org.nd4j.ir.TensorProto.Segment segment = 3;TensorNamespace.TensorProto.BuildersetStringData(int index, org.nd4j.shade.protobuf.ByteString value)For strings.TensorNamespace.TensorProto.BuildersetUint64Data(int index, long value)For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64TensorNamespace.TensorProto.BuildersetUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class org.nd4j.shade.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
clear
public TensorNamespace.TensorProto.Builder clear()
- Specified by:
clearin interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
clearin interfaceorg.nd4j.shade.protobuf.MessageLite.Builder- Overrides:
clearin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
getDescriptorForType
public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfaceorg.nd4j.shade.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
getDefaultInstanceForType
public TensorNamespace.TensorProto getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceorg.nd4j.shade.protobuf.MessageOrBuilder
-
build
public TensorNamespace.TensorProto build()
- Specified by:
buildin interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
buildin interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
-
buildPartial
public TensorNamespace.TensorProto buildPartial()
- Specified by:
buildPartialin interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
buildPartialin interfaceorg.nd4j.shade.protobuf.MessageLite.Builder
-
clone
public TensorNamespace.TensorProto.Builder clone()
- Specified by:
clonein interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
clonein interfaceorg.nd4j.shade.protobuf.MessageLite.Builder- Overrides:
clonein classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
setField
public TensorNamespace.TensorProto.Builder setField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
setFieldin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
clearField
public TensorNamespace.TensorProto.Builder clearField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
clearFieldin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
clearOneof
public TensorNamespace.TensorProto.Builder clearOneof(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
clearOneofin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
setRepeatedField
public TensorNamespace.TensorProto.Builder setRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
addRepeatedField
public TensorNamespace.TensorProto.Builder addRepeatedField(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
mergeFrom
public TensorNamespace.TensorProto.Builder mergeFrom(org.nd4j.shade.protobuf.Message other)
- Specified by:
mergeFromin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
mergeFromin classorg.nd4j.shade.protobuf.AbstractMessage.Builder<TensorNamespace.TensorProto.Builder>
-
mergeFrom
public TensorNamespace.TensorProto.Builder mergeFrom(TensorNamespace.TensorProto other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfaceorg.nd4j.shade.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
mergeFrom
public TensorNamespace.TensorProto.Builder mergeFrom(org.nd4j.shade.protobuf.CodedInputStream input, org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfaceorg.nd4j.shade.protobuf.Message.Builder- Specified by:
mergeFromin interfaceorg.nd4j.shade.protobuf.MessageLite.Builder- Overrides:
mergeFromin classorg.nd4j.shade.protobuf.AbstractMessage.Builder<TensorNamespace.TensorProto.Builder>- Throws:
IOException
-
getDimsList
public List<Long> getDimsList()
The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the dims.
-
getDimsCount
public int getDimsCount()
The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of dims.
-
getDims
public long getDims(int index)
The shape of the tensor.
repeated int64 dims = 1;- Specified by:
getDimsin interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The dims at the given index.
-
setDims
public TensorNamespace.TensorProto.Builder setDims(int index, long value)
The shape of the tensor.
repeated int64 dims = 1;- Parameters:
index- The index to set the value at.value- The dims to set.- Returns:
- This builder for chaining.
-
addDims
public TensorNamespace.TensorProto.Builder addDims(long value)
The shape of the tensor.
repeated int64 dims = 1;- Parameters:
value- The dims to add.- Returns:
- This builder for chaining.
-
addAllDims
public TensorNamespace.TensorProto.Builder addAllDims(Iterable<? extends Long> values)
The shape of the tensor.
repeated int64 dims = 1;- Parameters:
values- The dims to add.- Returns:
- This builder for chaining.
-
clearDims
public TensorNamespace.TensorProto.Builder clearDims()
The shape of the tensor.
repeated int64 dims = 1;- Returns:
- This builder for chaining.
-
getDataType
public int getDataType()
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
int32 data_type = 2;- Specified by:
getDataTypein interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The dataType.
-
setDataType
public TensorNamespace.TensorProto.Builder setDataType(int value)
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
int32 data_type = 2;- Parameters:
value- The dataType to set.- Returns:
- This builder for chaining.
-
clearDataType
public TensorNamespace.TensorProto.Builder clearDataType()
The data type of the tensor. This field MUST have a valid TensorProto.DataType value
int32 data_type = 2;- Returns:
- This builder for chaining.
-
hasSegment
public boolean hasSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3;- Specified by:
hasSegmentin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- Whether the segment field is set.
-
getSegment
public TensorNamespace.TensorProto.Segment getSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3;- Specified by:
getSegmentin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The segment.
-
setSegment
public TensorNamespace.TensorProto.Builder setSegment(TensorNamespace.TensorProto.Segment value)
.org.nd4j.ir.TensorProto.Segment segment = 3;
-
setSegment
public TensorNamespace.TensorProto.Builder setSegment(TensorNamespace.TensorProto.Segment.Builder builderForValue)
.org.nd4j.ir.TensorProto.Segment segment = 3;
-
mergeSegment
public TensorNamespace.TensorProto.Builder mergeSegment(TensorNamespace.TensorProto.Segment value)
.org.nd4j.ir.TensorProto.Segment segment = 3;
-
clearSegment
public TensorNamespace.TensorProto.Builder clearSegment()
.org.nd4j.ir.TensorProto.Segment segment = 3;
-
getSegmentBuilder
public TensorNamespace.TensorProto.Segment.Builder getSegmentBuilder()
.org.nd4j.ir.TensorProto.Segment segment = 3;
-
getSegmentOrBuilder
public TensorNamespace.TensorProto.SegmentOrBuilder getSegmentOrBuilder()
.org.nd4j.ir.TensorProto.Segment segment = 3;- Specified by:
getSegmentOrBuilderin interfaceTensorNamespace.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 appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];- Specified by:
getFloatDataListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the floatData.
-
getFloatDataCount
public int getFloatDataCount()
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];- Specified by:
getFloatDataCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of floatData.
-
getFloatData
public float getFloatData(int index)
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
repeated float float_data = 4 [packed = true];- Specified by:
getFloatDatain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The floatData at the given index.
-
setFloatData
public TensorNamespace.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 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];- Parameters:
index- The index to set the value at.value- The floatData to set.- Returns:
- This builder for chaining.
-
addFloatData
public TensorNamespace.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 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];- Parameters:
value- The floatData to add.- Returns:
- This builder for chaining.
-
addAllFloatData
public TensorNamespace.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 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];- Parameters:
values- The floatData to add.- Returns:
- This builder for chaining.
-
clearFloatData
public TensorNamespace.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 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];- Returns:
- This builder for chaining.
-
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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32DataListin interfaceTensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32DataCountin interfaceTensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Specified by:
getInt32Datain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The int32Data at the given index.
-
setInt32Data
public TensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Parameters:
index- The index to set the value at.value- The int32Data to set.- Returns:
- This builder for chaining.
-
addInt32Data
public TensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Parameters:
value- The int32Data to add.- Returns:
- This builder for chaining.
-
addAllInt32Data
public TensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Parameters:
values- The int32Data to add.- Returns:
- This builder for chaining.
-
clearInt32Data
public TensorNamespace.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, UINT8, BOOL, or FLOAT16
repeated int32 int32_data = 5 [packed = true];- Returns:
- This builder for chaining.
-
getStringDataList
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;- Specified by:
getStringDataListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the stringData.
-
getStringDataCount
public int getStringDataCount()
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
repeated bytes string_data = 6;- Specified by:
getStringDataCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of stringData.
-
getStringData
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;- Specified by:
getStringDatain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The stringData at the given index.
-
setStringData
public TensorNamespace.TensorProto.Builder setStringData(int index, org.nd4j.shade.protobuf.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;- Parameters:
index- The index to set the value at.value- The stringData to set.- Returns:
- This builder for chaining.
-
addStringData
public TensorNamespace.TensorProto.Builder addStringData(org.nd4j.shade.protobuf.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;- Parameters:
value- The stringData to add.- Returns:
- This builder for chaining.
-
addAllStringData
public TensorNamespace.TensorProto.Builder addAllStringData(Iterable<? extends org.nd4j.shade.protobuf.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;- Parameters:
values- The stringData to add.- Returns:
- This builder for chaining.
-
clearStringData
public TensorNamespace.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;- Returns:
- This builder for chaining.
-
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:
getInt64DataListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the int64Data.
-
getInt64DataCount
public int getInt64DataCount()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];- Specified by:
getInt64DataCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of int64Data.
-
getInt64Data
public long getInt64Data(int index)
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];- Specified by:
getInt64Datain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The int64Data at the given index.
-
setInt64Data
public TensorNamespace.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];- Parameters:
index- The index to set the value at.value- The int64Data to set.- Returns:
- This builder for chaining.
-
addInt64Data
public TensorNamespace.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];- Parameters:
value- The int64Data to add.- Returns:
- This builder for chaining.
-
addAllInt64Data
public TensorNamespace.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];- Parameters:
values- The int64Data to add.- Returns:
- This builder for chaining.
-
clearInt64Data
public TensorNamespace.TensorProto.Builder clearInt64Data()
For int64. When this field is present, the data_type field MUST be INT64
repeated int64 int64_data = 7 [packed = true];- Returns:
- This builder for chaining.
-
getName
public String getName()
Optionally, a name for the tensor.
string name = 8;- Specified by:
getNamein interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The name.
-
getNameBytes
public org.nd4j.shade.protobuf.ByteString getNameBytes()
Optionally, a name for the tensor.
string name = 8;- Specified by:
getNameBytesin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The bytes for name.
-
setName
public TensorNamespace.TensorProto.Builder setName(String value)
Optionally, a name for the tensor.
string name = 8;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public TensorNamespace.TensorProto.Builder clearName()
Optionally, a name for the tensor.
string name = 8;- Returns:
- This builder for chaining.
-
setNameBytes
public TensorNamespace.TensorProto.Builder setNameBytes(org.nd4j.shade.protobuf.ByteString value)
Optionally, a name for the tensor.
string name = 8;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDocString
public String getDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;- Specified by:
getDocStringin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The docString.
-
getDocStringBytes
public org.nd4j.shade.protobuf.ByteString getDocStringBytes()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;- Specified by:
getDocStringBytesin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The bytes for docString.
-
setDocString
public TensorNamespace.TensorProto.Builder setDocString(String value)
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;- Parameters:
value- The docString to set.- Returns:
- This builder for chaining.
-
clearDocString
public TensorNamespace.TensorProto.Builder clearDocString()
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;- Returns:
- This builder for chaining.
-
setDocStringBytes
public TensorNamespace.TensorProto.Builder setDocStringBytes(org.nd4j.shade.protobuf.ByteString value)
A human-readable documentation for this tensor. Markdown is allowed.
string doc_string = 12;- Parameters:
value- The bytes for docString to set.- Returns:
- This builder for chaining.
-
getRawData
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;- Specified by:
getRawDatain interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The rawData.
-
setRawData
public TensorNamespace.TensorProto.Builder setRawData(org.nd4j.shade.protobuf.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;- Parameters:
value- The rawData to set.- Returns:
- This builder for chaining.
-
clearRawData
public TensorNamespace.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;- Returns:
- This builder for chaining.
-
getExternalDataList
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;- Specified by:
getExternalDataListin interfaceTensorNamespace.TensorProtoOrBuilder
-
getExternalDataCount
public int getExternalDataCount()
Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are: - "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support. - "length" (optional) - number of bytes containing data. Integer stored as string. - "checksum" (optional) - SHA1 digest of file specified in under 'location' key.repeated .org.nd4j.ir.StringStringEntryProto external_data = 13;- Specified by:
getExternalDataCountin interfaceTensorNamespace.TensorProtoOrBuilder
-
getExternalData
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;- Specified by:
getExternalDatain interfaceTensorNamespace.TensorProtoOrBuilder
-
setExternalData
public TensorNamespace.TensorProto.Builder setExternalData(int index, TensorNamespace.StringStringEntryProto value)
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;
-
setExternalData
public TensorNamespace.TensorProto.Builder setExternalData(int index, TensorNamespace.StringStringEntryProto.Builder builderForValue)
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;
-
addExternalData
public TensorNamespace.TensorProto.Builder addExternalData(TensorNamespace.StringStringEntryProto value)
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;
-
addExternalData
public TensorNamespace.TensorProto.Builder addExternalData(int index, TensorNamespace.StringStringEntryProto value)
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;
-
addExternalData
public TensorNamespace.TensorProto.Builder addExternalData(TensorNamespace.StringStringEntryProto.Builder builderForValue)
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;
-
addExternalData
public TensorNamespace.TensorProto.Builder addExternalData(int index, TensorNamespace.StringStringEntryProto.Builder builderForValue)
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;
-
addAllExternalData
public TensorNamespace.TensorProto.Builder addAllExternalData(Iterable<? extends TensorNamespace.StringStringEntryProto> values)
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;
-
clearExternalData
public TensorNamespace.TensorProto.Builder clearExternalData()
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;
-
removeExternalData
public TensorNamespace.TensorProto.Builder removeExternalData(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;
-
getExternalDataBuilder
public TensorNamespace.StringStringEntryProto.Builder getExternalDataBuilder(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
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;- Specified by:
getExternalDataOrBuilderin interfaceTensorNamespace.TensorProtoOrBuilder
-
getExternalDataOrBuilderList
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;- Specified by:
getExternalDataOrBuilderListin interfaceTensorNamespace.TensorProtoOrBuilder
-
addExternalDataBuilder
public TensorNamespace.StringStringEntryProto.Builder addExternalDataBuilder()
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;
-
addExternalDataBuilder
public TensorNamespace.StringStringEntryProto.Builder addExternalDataBuilder(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;
-
getExternalDataBuilderList
public List<TensorNamespace.StringStringEntryProto.Builder> getExternalDataBuilderList()
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;
-
getDataLocationValue
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;- Specified by:
getDataLocationValuein interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The enum numeric value on the wire for dataLocation.
-
setDataLocationValue
public TensorNamespace.TensorProto.Builder setDataLocationValue(int value)
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;- Parameters:
value- The enum numeric value on the wire for dataLocation to set.- Returns:
- This builder for chaining.
-
getDataLocation
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;- Specified by:
getDataLocationin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The dataLocation.
-
setDataLocation
public TensorNamespace.TensorProto.Builder setDataLocation(TensorNamespace.TensorProto.DataLocation value)
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;- Parameters:
value- The dataLocation to set.- Returns:
- This builder for chaining.
-
clearDataLocation
public TensorNamespace.TensorProto.Builder clearDataLocation()
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;- Returns:
- This builder for chaining.
-
getDoubleDataList
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];- Specified by:
getDoubleDataListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the doubleData.
-
getDoubleDataCount
public int getDoubleDataCount()
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];- Specified by:
getDoubleDataCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of doubleData.
-
getDoubleData
public double getDoubleData(int index)
For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
repeated double double_data = 10 [packed = true];- Specified by:
getDoubleDatain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The doubleData at the given index.
-
setDoubleData
public TensorNamespace.TensorProto.Builder setDoubleData(int index, double value)
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];- Parameters:
index- The index to set the value at.value- The doubleData to set.- Returns:
- This builder for chaining.
-
addDoubleData
public TensorNamespace.TensorProto.Builder addDoubleData(double value)
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];- Parameters:
value- The doubleData to add.- Returns:
- This builder for chaining.
-
addAllDoubleData
public TensorNamespace.TensorProto.Builder addAllDoubleData(Iterable<? extends Double> values)
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];- Parameters:
values- The doubleData to add.- Returns:
- This builder for chaining.
-
clearDoubleData
public TensorNamespace.TensorProto.Builder clearDoubleData()
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];- Returns:
- This builder for chaining.
-
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:
getUint64DataListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the uint64Data.
-
getUint64DataCount
public int getUint64DataCount()
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];- Specified by:
getUint64DataCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of uint64Data.
-
getUint64Data
public long getUint64Data(int index)
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
repeated uint64 uint64_data = 11 [packed = true];- Specified by:
getUint64Datain interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The uint64Data at the given index.
-
setUint64Data
public TensorNamespace.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];- Parameters:
index- The index to set the value at.value- The uint64Data to set.- Returns:
- This builder for chaining.
-
addUint64Data
public TensorNamespace.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];- Parameters:
value- The uint64Data to add.- Returns:
- This builder for chaining.
-
addAllUint64Data
public TensorNamespace.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];- Parameters:
values- The uint64Data to add.- Returns:
- This builder for chaining.
-
clearUint64Data
public TensorNamespace.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];- Returns:
- This builder for chaining.
-
getHalfValList
public List<Integer> getHalfValList()
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Specified by:
getHalfValListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the halfVal.
-
getHalfValCount
public int getHalfValCount()
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Specified by:
getHalfValCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of halfVal.
-
getHalfVal
public int getHalfVal(int index)
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Specified by:
getHalfValin interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The halfVal at the given index.
-
setHalfVal
public TensorNamespace.TensorProto.Builder setHalfVal(int index, int value)
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Parameters:
index- The index to set the value at.value- The halfVal to set.- Returns:
- This builder for chaining.
-
addHalfVal
public TensorNamespace.TensorProto.Builder addHalfVal(int value)
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Parameters:
value- The halfVal to add.- Returns:
- This builder for chaining.
-
addAllHalfVal
public TensorNamespace.TensorProto.Builder addAllHalfVal(Iterable<? extends Integer> values)
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Parameters:
values- The halfVal to add.- Returns:
- This builder for chaining.
-
clearHalfVal
public TensorNamespace.TensorProto.Builder clearHalfVal()
For half values (tensorflow compatibility)
repeated int32 half_val = 15 [packed = true];- Returns:
- This builder for chaining.
-
getBoolValList
public List<Boolean> getBoolValList()
boolean values
repeated bool bool_val = 16 [packed = true];- Specified by:
getBoolValListin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- A list containing the boolVal.
-
getBoolValCount
public int getBoolValCount()
boolean values
repeated bool bool_val = 16 [packed = true];- Specified by:
getBoolValCountin interfaceTensorNamespace.TensorProtoOrBuilder- Returns:
- The count of boolVal.
-
getBoolVal
public boolean getBoolVal(int index)
boolean values
repeated bool bool_val = 16 [packed = true];- Specified by:
getBoolValin interfaceTensorNamespace.TensorProtoOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The boolVal at the given index.
-
setBoolVal
public TensorNamespace.TensorProto.Builder setBoolVal(int index, boolean value)
boolean values
repeated bool bool_val = 16 [packed = true];- Parameters:
index- The index to set the value at.value- The boolVal to set.- Returns:
- This builder for chaining.
-
addBoolVal
public TensorNamespace.TensorProto.Builder addBoolVal(boolean value)
boolean values
repeated bool bool_val = 16 [packed = true];- Parameters:
value- The boolVal to add.- Returns:
- This builder for chaining.
-
addAllBoolVal
public TensorNamespace.TensorProto.Builder addAllBoolVal(Iterable<? extends Boolean> values)
boolean values
repeated bool bool_val = 16 [packed = true];- Parameters:
values- The boolVal to add.- Returns:
- This builder for chaining.
-
clearBoolVal
public TensorNamespace.TensorProto.Builder clearBoolVal()
boolean values
repeated bool bool_val = 16 [packed = true];- Returns:
- This builder for chaining.
-
setUnknownFields
public final TensorNamespace.TensorProto.Builder setUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
mergeUnknownFields
public final TensorNamespace.TensorProto.Builder mergeUnknownFields(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfaceorg.nd4j.shade.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classorg.nd4j.shade.protobuf.GeneratedMessageV3.Builder<TensorNamespace.TensorProto.Builder>
-
-