Package ai.onnx.proto
Class OnnxMl.SparseTensorProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
ai.onnx.proto.OnnxMl.SparseTensorProto.Builder
- All Implemented Interfaces:
OnnxMl.SparseTensorProtoOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- OnnxMl.SparseTensorProto
public static final class OnnxMl.SparseTensorProto.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
implements OnnxMl.SparseTensorProtoOrBuilder
A serialized sparse-tensor valueProtobuf type
onnx.SparseTensorProto
-
Method Summary
Modifier and TypeMethodDescriptionaddAllDims
(Iterable<? extends Long> values) The shape of the underlying dense-tensor: [dim_1, dim_2, ...addDims
(long value) The shape of the underlying dense-tensor: [dim_1, dim_2, ...addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
The shape of the underlying dense-tensor: [dim_1, dim_2, ...clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) The indices of the non-default values, which may be stored in one of two formats.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) The sequence of non-default values are encoded as a tensor of shape [NNZ].clone()
static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
long
getDims
(int index) The shape of the underlying dense-tensor: [dim_1, dim_2, ...int
The shape of the underlying dense-tensor: [dim_1, dim_2, ...The shape of the underlying dense-tensor: [dim_1, dim_2, ...The indices of the non-default values, which may be stored in one of two formats.The indices of the non-default values, which may be stored in one of two formats.The indices of the non-default values, which may be stored in one of two formats.The sequence of non-default values are encoded as a tensor of shape [NNZ].The sequence of non-default values are encoded as a tensor of shape [NNZ].The sequence of non-default values are encoded as a tensor of shape [NNZ].boolean
The indices of the non-default values, which may be stored in one of two formats.boolean
The sequence of non-default values are encoded as a tensor of shape [NNZ].protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeIndices
(OnnxMl.TensorProto value) The indices of the non-default values, which may be stored in one of two formats.mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) mergeValues
(OnnxMl.TensorProto value) The sequence of non-default values are encoded as a tensor of shape [NNZ].setDims
(int index, long value) The shape of the underlying dense-tensor: [dim_1, dim_2, ...setIndices
(OnnxMl.TensorProto value) The indices of the non-default values, which may be stored in one of two formats.setIndices
(OnnxMl.TensorProto.Builder builderForValue) The indices of the non-default values, which may be stored in one of two formats.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) setValues
(OnnxMl.TensorProto value) The sequence of non-default values are encoded as a tensor of shape [NNZ].setValues
(OnnxMl.TensorProto.Builder builderForValue) The sequence of non-default values are encoded as a tensor of shape [NNZ].Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
setField
public OnnxMl.SparseTensorProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clearField
public OnnxMl.SparseTensorProto.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clearOneof
public OnnxMl.SparseTensorProto.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
setRepeatedField
public OnnxMl.SparseTensorProto.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
addRepeatedField
public OnnxMl.SparseTensorProto.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeFrom
public OnnxMl.SparseTensorProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.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.
optional .onnx.TensorProto values = 1;
- Specified by:
hasValues
in interfaceOnnxMl.SparseTensorProtoOrBuilder
- Returns:
- Whether the values field is set.
-
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.
optional .onnx.TensorProto values = 1;
- Specified by:
getValues
in interfaceOnnxMl.SparseTensorProtoOrBuilder
- Returns:
- The values.
-
setValues
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.
optional .onnx.TensorProto values = 1;
-
setValues
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.
optional .onnx.TensorProto values = 1;
-
mergeValues
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.
optional .onnx.TensorProto values = 1;
-
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.
optional .onnx.TensorProto values = 1;
-
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.
optional .onnx.TensorProto values = 1;
-
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.
optional .onnx.TensorProto values = 1;
- Specified by:
getValuesOrBuilder
in interfaceOnnxMl.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]
optional .onnx.TensorProto indices = 2;
- Specified by:
hasIndices
in interfaceOnnxMl.SparseTensorProtoOrBuilder
- Returns:
- Whether the indices field is set.
-
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]
optional .onnx.TensorProto indices = 2;
- Specified by:
getIndices
in interfaceOnnxMl.SparseTensorProtoOrBuilder
- Returns:
- The indices.
-
setIndices
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]
optional .onnx.TensorProto indices = 2;
-
setIndices
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]
optional .onnx.TensorProto indices = 2;
-
mergeIndices
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]
optional .onnx.TensorProto indices = 2;
-
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]
optional .onnx.TensorProto indices = 2;
-
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]
optional .onnx.TensorProto indices = 2;
-
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]
optional .onnx.TensorProto indices = 2;
- Specified by:
getIndicesOrBuilder
in interfaceOnnxMl.SparseTensorProtoOrBuilder
-
getDimsList
The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
repeated int64 dims = 3;
- Specified by:
getDimsList
in interfaceOnnxMl.SparseTensorProtoOrBuilder
- Returns:
- A list containing the dims.
-
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 interfaceOnnxMl.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 interfaceOnnxMl.SparseTensorProtoOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The dims at the given index.
-
setDims
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
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
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
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(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeUnknownFields
public final OnnxMl.SparseTensorProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-