Package onnx

Class Onnx.TensorProto.Builder

    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • clear

        public Onnx.TensorProto.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • getDefaultInstanceForType

        public Onnx.TensorProto getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Onnx.TensorProto build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Onnx.TensorProto buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Onnx.TensorProto.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • setField

        public Onnx.TensorProto.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • clearField

        public Onnx.TensorProto.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • clearOneof

        public Onnx.TensorProto.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • setRepeatedField

        public Onnx.TensorProto.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         int index,
                                                         Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • addRepeatedField

        public Onnx.TensorProto.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • mergeFrom

        public Onnx.TensorProto.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Onnx.TensorProto.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • mergeFrom

        public Onnx.TensorProto.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Onnx.TensorProto.Builder>
        Throws:
        IOException
      • getDimsCount

        public int getDimsCount()
         The shape of the tensor.
         
        repeated int64 dims = 1;
        Specified by:
        getDimsCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of dims.
      • getDims

        public long getDims​(int index)
         The shape of the tensor.
         
        repeated int64 dims = 1;
        Specified by:
        getDims in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The dims at the given index.
      • setDims

        public Onnx.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 Onnx.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 Onnx.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 Onnx.TensorProto.Builder clearDims()
         The shape of the tensor.
         
        repeated int64 dims = 1;
        Returns:
        This builder for chaining.
      • hasDataType

        public boolean hasDataType()
         The data type of the tensor.
         
        optional .onnx.TensorProto.DataType data_type = 2;
        Specified by:
        hasDataType in interface Onnx.TensorProtoOrBuilder
        Returns:
        Whether the dataType field is set.
      • setDataType

        public Onnx.TensorProto.Builder setDataType​(Onnx.TensorProto.DataType value)
         The data type of the tensor.
         
        optional .onnx.TensorProto.DataType data_type = 2;
        Parameters:
        value - The dataType to set.
        Returns:
        This builder for chaining.
      • clearDataType

        public Onnx.TensorProto.Builder clearDataType()
         The data type of the tensor.
         
        optional .onnx.TensorProto.DataType data_type = 2;
        Returns:
        This builder for chaining.
      • hasSegment

        public boolean hasSegment()
        optional .onnx.TensorProto.Segment segment = 3;
        Specified by:
        hasSegment in interface Onnx.TensorProtoOrBuilder
        Returns:
        Whether the segment field is set.
      • getFloatDataList

        public List<Float> getFloatDataList()
         For float and complex64 values
         Complex64 tensors are encoded as a single array of floats,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
         
        repeated float float_data = 4 [packed = true];
        Specified by:
        getFloatDataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the floatData.
      • getFloatDataCount

        public int getFloatDataCount()
         For float and complex64 values
         Complex64 tensors are encoded as a single array of floats,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
         
        repeated float float_data = 4 [packed = true];
        Specified by:
        getFloatDataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of floatData.
      • getFloatData

        public float getFloatData​(int index)
         For float and complex64 values
         Complex64 tensors are encoded as a single array of floats,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
         
        repeated float float_data = 4 [packed = true];
        Specified by:
        getFloatData in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The floatData at the given index.
      • setFloatData

        public Onnx.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];
        Parameters:
        index - The index to set the value at.
        value - The floatData to set.
        Returns:
        This builder for chaining.
      • addFloatData

        public Onnx.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];
        Parameters:
        value - The floatData to add.
        Returns:
        This builder for chaining.
      • addAllFloatData

        public Onnx.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];
        Parameters:
        values - The floatData to add.
        Returns:
        This builder for chaining.
      • clearFloatData

        public Onnx.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];
        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, INT8, BOOL, or FLOAT32
         
        repeated int32 int32_data = 5 [packed = true];
        Specified by:
        getInt32DataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the int32Data.
      • getInt32DataCount

        public int getInt32DataCount()
         For int32, uint8, int8, uint16, int16, bool, and float16 values
         float16 values must be bit-wise converted to an uint16_t prior
         to writing to the buffer.
         When this field is present, the data_type field MUST be
         INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
         
        repeated int32 int32_data = 5 [packed = true];
        Specified by:
        getInt32DataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of int32Data.
      • getInt32Data

        public int getInt32Data​(int index)
         For int32, uint8, int8, uint16, int16, bool, and float16 values
         float16 values must be bit-wise converted to an uint16_t prior
         to writing to the buffer.
         When this field is present, the data_type field MUST be
         INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
         
        repeated int32 int32_data = 5 [packed = true];
        Specified by:
        getInt32Data in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The int32Data at the given index.
      • setInt32Data

        public Onnx.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];
        Parameters:
        index - The index to set the value at.
        value - The int32Data to set.
        Returns:
        This builder for chaining.
      • addInt32Data

        public Onnx.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];
        Parameters:
        value - The int32Data to add.
        Returns:
        This builder for chaining.
      • addAllInt32Data

        public Onnx.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];
        Parameters:
        values - The int32Data to add.
        Returns:
        This builder for chaining.
      • clearInt32Data

        public Onnx.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];
        Returns:
        This builder for chaining.
      • getStringDataList

        public List<com.google.protobuf.ByteString> getStringDataList()
         For strings.
         Each element of string_data is a UTF-8 encoded Unicode
         string. No trailing null, no leading BOM. The protobuf "string"
         scalar type is not used to match ML community conventions.
         When this field is present, the data_type field MUST be STRING
         
        repeated bytes string_data = 6;
        Specified by:
        getStringDataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the stringData.
      • getStringDataCount

        public int getStringDataCount()
         For strings.
         Each element of string_data is a UTF-8 encoded Unicode
         string. No trailing null, no leading BOM. The protobuf "string"
         scalar type is not used to match ML community conventions.
         When this field is present, the data_type field MUST be STRING
         
        repeated bytes string_data = 6;
        Specified by:
        getStringDataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of stringData.
      • getStringData

        public com.google.protobuf.ByteString getStringData​(int index)
         For strings.
         Each element of string_data is a UTF-8 encoded Unicode
         string. No trailing null, no leading BOM. The protobuf "string"
         scalar type is not used to match ML community conventions.
         When this field is present, the data_type field MUST be STRING
         
        repeated bytes string_data = 6;
        Specified by:
        getStringData in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The stringData at the given index.
      • setStringData

        public Onnx.TensorProto.Builder setStringData​(int index,
                                                      com.google.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 Onnx.TensorProto.Builder addStringData​(com.google.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 Onnx.TensorProto.Builder addAllStringData​(Iterable<? extends com.google.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 Onnx.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:
        getInt64DataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the int64Data.
      • getInt64DataCount

        public int getInt64DataCount()
         For int64.
         When this field is present, the data_type field MUST be INT64
         
        repeated int64 int64_data = 7 [packed = true];
        Specified by:
        getInt64DataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of int64Data.
      • getInt64Data

        public long getInt64Data​(int index)
         For int64.
         When this field is present, the data_type field MUST be INT64
         
        repeated int64 int64_data = 7 [packed = true];
        Specified by:
        getInt64Data in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The int64Data at the given index.
      • setInt64Data

        public Onnx.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 Onnx.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 Onnx.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 Onnx.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.
      • hasName

        public boolean hasName()
         Optionally, a name for the tensor.
         
        optional string name = 8;
        Specified by:
        hasName in interface Onnx.TensorProtoOrBuilder
        Returns:
        Whether the name field is set.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Optionally, a name for the tensor.
         
        optional string name = 8;
        Specified by:
        getNameBytes in interface Onnx.TensorProtoOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Onnx.TensorProto.Builder setName​(String value)
         Optionally, a name for the tensor.
         
        optional string name = 8;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Onnx.TensorProto.Builder clearName()
         Optionally, a name for the tensor.
         
        optional string name = 8;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Onnx.TensorProto.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Optionally, a name for the tensor.
         
        optional string name = 8;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasDocString

        public boolean hasDocString()
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Specified by:
        hasDocString in interface Onnx.TensorProtoOrBuilder
        Returns:
        Whether the docString field is set.
      • getDocString

        public String getDocString()
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Specified by:
        getDocString in interface Onnx.TensorProtoOrBuilder
        Returns:
        The docString.
      • getDocStringBytes

        public com.google.protobuf.ByteString getDocStringBytes()
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Specified by:
        getDocStringBytes in interface Onnx.TensorProtoOrBuilder
        Returns:
        The bytes for docString.
      • setDocString

        public Onnx.TensorProto.Builder setDocString​(String value)
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Parameters:
        value - The docString to set.
        Returns:
        This builder for chaining.
      • clearDocString

        public Onnx.TensorProto.Builder clearDocString()
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Returns:
        This builder for chaining.
      • setDocStringBytes

        public Onnx.TensorProto.Builder setDocStringBytes​(com.google.protobuf.ByteString value)
         A human-readable documentation for this tensor. Markdown is allowed.
         
        optional string doc_string = 12;
        Parameters:
        value - The bytes for docString to set.
        Returns:
        This builder for chaining.
      • hasRawData

        public boolean hasRawData()
         Serializations can either use one of the fields above, or use this
         raw bytes field. The only exception is the string case, where one is
         required to store the content in the repeated bytes string_data field.
         When this raw_data field is used to store tensor value, elements MUST
         be stored in as fixed-width, little-endian order.
         Floating-point data types MUST be stored in IEEE 754 format.
         Complex64 elements must be written as two consecutive FLOAT values, real component first.
         Complex128 elements must be written as two consecutive DOUBLE values, real component first.
         Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
         Note: the advantage of specific field rather than the raw_data field is
         that in some cases (e.g. int data), protobuf does a better packing via
         variable length storage, and may lead to smaller binary footprint.
         When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
         
        optional bytes raw_data = 9;
        Specified by:
        hasRawData in interface Onnx.TensorProtoOrBuilder
        Returns:
        Whether the rawData field is set.
      • getRawData

        public com.google.protobuf.ByteString getRawData()
         Serializations can either use one of the fields above, or use this
         raw bytes field. The only exception is the string case, where one is
         required to store the content in the repeated bytes string_data field.
         When this raw_data field is used to store tensor value, elements MUST
         be stored in as fixed-width, little-endian order.
         Floating-point data types MUST be stored in IEEE 754 format.
         Complex64 elements must be written as two consecutive FLOAT values, real component first.
         Complex128 elements must be written as two consecutive DOUBLE values, real component first.
         Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false).
         Note: the advantage of specific field rather than the raw_data field is
         that in some cases (e.g. int data), protobuf does a better packing via
         variable length storage, and may lead to smaller binary footprint.
         When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
         
        optional bytes raw_data = 9;
        Specified by:
        getRawData in interface Onnx.TensorProtoOrBuilder
        Returns:
        The rawData.
      • setRawData

        public Onnx.TensorProto.Builder setRawData​(com.google.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
         
        optional bytes raw_data = 9;
        Parameters:
        value - The rawData to set.
        Returns:
        This builder for chaining.
      • clearRawData

        public Onnx.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
         
        optional bytes raw_data = 9;
        Returns:
        This builder for chaining.
      • getDoubleDataList

        public List<Double> getDoubleDataList()
         For double
         Complex64 tensors are encoded as a single array of doubles,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
         
        repeated double double_data = 10 [packed = true];
        Specified by:
        getDoubleDataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the doubleData.
      • getDoubleDataCount

        public int getDoubleDataCount()
         For double
         Complex64 tensors are encoded as a single array of doubles,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
         
        repeated double double_data = 10 [packed = true];
        Specified by:
        getDoubleDataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of doubleData.
      • getDoubleData

        public double getDoubleData​(int index)
         For double
         Complex64 tensors are encoded as a single array of doubles,
         with the real components appearing in odd numbered positions,
         and the corresponding imaginary component apparing in the
         subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i]
         is encoded as [1.0, 2.0 ,3.0 ,4.0]
         When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
         
        repeated double double_data = 10 [packed = true];
        Specified by:
        getDoubleData in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The doubleData at the given index.
      • setDoubleData

        public Onnx.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];
        Parameters:
        index - The index to set the value at.
        value - The doubleData to set.
        Returns:
        This builder for chaining.
      • addDoubleData

        public Onnx.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];
        Parameters:
        value - The doubleData to add.
        Returns:
        This builder for chaining.
      • addAllDoubleData

        public Onnx.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];
        Parameters:
        values - The doubleData to add.
        Returns:
        This builder for chaining.
      • clearDoubleData

        public Onnx.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];
        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:
        getUint64DataList in interface Onnx.TensorProtoOrBuilder
        Returns:
        A list containing the uint64Data.
      • getUint64DataCount

        public int getUint64DataCount()
         For uint64 and uint32 values
         When this field is present, the data_type field MUST be
         UINT32 or UINT64
         
        repeated uint64 uint64_data = 11 [packed = true];
        Specified by:
        getUint64DataCount in interface Onnx.TensorProtoOrBuilder
        Returns:
        The count of uint64Data.
      • getUint64Data

        public long getUint64Data​(int index)
         For uint64 and uint32 values
         When this field is present, the data_type field MUST be
         UINT32 or UINT64
         
        repeated uint64 uint64_data = 11 [packed = true];
        Specified by:
        getUint64Data in interface Onnx.TensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The uint64Data at the given index.
      • setUint64Data

        public Onnx.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 Onnx.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 Onnx.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 Onnx.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.
      • setUnknownFields

        public final Onnx.TensorProto.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>
      • mergeUnknownFields

        public final Onnx.TensorProto.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Onnx.TensorProto.Builder>