Class OnnxMl.SparseTensorProto.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<OnnxMl.SparseTensorProto.Builder>
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.Descriptorcom.google.protobuf.Descriptors.DescriptorlonggetDims(int index) The shape of the underlying dense-tensor: [dim_1, dim_2, ...intThe 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].booleanThe indices of the non-default values, which may be stored in one of two formats.booleanThe sequence of non-default values are encoded as a tensor of shape [NNZ].protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
setField
public OnnxMl.SparseTensorProto.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clearField
public OnnxMl.SparseTensorProto.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
clearOneof
public OnnxMl.SparseTensorProto.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin 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:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
addRepeatedField
public OnnxMl.SparseTensorProto.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
hasValuesin 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:
getValuesin 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:
getValuesOrBuilderin 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:
hasIndicesin 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:
getIndicesin 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:
getIndicesOrBuilderin interfaceOnnxMl.SparseTensorProtoOrBuilder
-
getDimsList
The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
repeated int64 dims = 3;- Specified by:
getDimsListin 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:
getDimsCountin 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:
getDimsin 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-
mergeUnknownFields
public final OnnxMl.SparseTensorProto.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<OnnxMl.SparseTensorProto.Builder>
-