Package onnx

Class OnnxMl.SparseTensorProto.Builder

    • Method Detail

      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • clear

        public OnnxMl.SparseTensorProto.Builder clear()
        Specified by:
        clear in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clear in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clear in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • getDescriptorForType

        public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • getDefaultInstanceForType

        public OnnxMl.SparseTensorProto getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public OnnxMl.SparseTensorProto build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public OnnxMl.SparseTensorProto buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

        public OnnxMl.SparseTensorProto.Builder clone()
        Specified by:
        clone in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clone in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clone in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • clearField

        public OnnxMl.SparseTensorProto.Builder clearField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • clearOneof

        public OnnxMl.SparseTensorProto.Builder clearOneof​(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearOneof in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • setRepeatedField

        public OnnxMl.SparseTensorProto.Builder setRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • addRepeatedField

        public OnnxMl.SparseTensorProto.Builder addRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • mergeFrom

        public OnnxMl.SparseTensorProto.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                                          org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<OnnxMl.SparseTensorProto.Builder>
        Throws:
        IOException
      • hasValues

        public boolean hasValues()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
        Specified by:
        hasValues in interface OnnxMl.SparseTensorProtoOrBuilder
        Returns:
        Whether the values field is set.
      • getValues

        public OnnxMl.TensorProto getValues()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
        Specified by:
        getValues in interface OnnxMl.SparseTensorProtoOrBuilder
        Returns:
        The values.
      • setValues

        public OnnxMl.SparseTensorProto.Builder setValues​(OnnxMl.TensorProto value)
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • setValues

        public OnnxMl.SparseTensorProto.Builder setValues​(OnnxMl.TensorProto.Builder builderForValue)
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • mergeValues

        public OnnxMl.SparseTensorProto.Builder mergeValues​(OnnxMl.TensorProto value)
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • clearValues

        public OnnxMl.SparseTensorProto.Builder clearValues()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • getValuesBuilder

        public OnnxMl.TensorProto.Builder getValuesBuilder()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • getValuesOrBuilder

        public OnnxMl.TensorProtoOrBuilder getValuesOrBuilder()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
        Specified by:
        getValuesOrBuilder in interface OnnxMl.SparseTensorProtoOrBuilder
      • hasIndices

        public boolean hasIndices()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
        Specified by:
        hasIndices in interface OnnxMl.SparseTensorProtoOrBuilder
        Returns:
        Whether the indices field is set.
      • getIndices

        public OnnxMl.TensorProto getIndices()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
        Specified by:
        getIndices in interface OnnxMl.SparseTensorProtoOrBuilder
        Returns:
        The indices.
      • setIndices

        public OnnxMl.SparseTensorProto.Builder setIndices​(OnnxMl.TensorProto value)
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • setIndices

        public OnnxMl.SparseTensorProto.Builder setIndices​(OnnxMl.TensorProto.Builder builderForValue)
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • mergeIndices

        public OnnxMl.SparseTensorProto.Builder mergeIndices​(OnnxMl.TensorProto value)
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • clearIndices

        public OnnxMl.SparseTensorProto.Builder clearIndices()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • getIndicesBuilder

        public OnnxMl.TensorProto.Builder getIndicesBuilder()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • getIndicesOrBuilder

        public OnnxMl.TensorProtoOrBuilder getIndicesOrBuilder()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
        Specified by:
        getIndicesOrBuilder in interface OnnxMl.SparseTensorProtoOrBuilder
      • getDimsCount

        public int getDimsCount()
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Specified by:
        getDimsCount in interface OnnxMl.SparseTensorProtoOrBuilder
        Returns:
        The count of dims.
      • getDims

        public long getDims​(int index)
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Specified by:
        getDims in interface OnnxMl.SparseTensorProtoOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The dims at the given index.
      • setDims

        public OnnxMl.SparseTensorProto.Builder setDims​(int index,
                                                        long value)
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Parameters:
        index - The index to set the value at.
        value - The dims to set.
        Returns:
        This builder for chaining.
      • addDims

        public OnnxMl.SparseTensorProto.Builder addDims​(long value)
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Parameters:
        value - The dims to add.
        Returns:
        This builder for chaining.
      • addAllDims

        public OnnxMl.SparseTensorProto.Builder addAllDims​(Iterable<? extends Long> values)
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Parameters:
        values - The dims to add.
        Returns:
        This builder for chaining.
      • clearDims

        public OnnxMl.SparseTensorProto.Builder clearDims()
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final OnnxMl.SparseTensorProto.Builder setUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
      • mergeUnknownFields

        public final OnnxMl.SparseTensorProto.Builder mergeUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>