Package ai.onnxruntime
Class OnnxSparseTensor.CSRCTensor
- Enclosing class:
- OnnxSparseTensor
public static final class OnnxSparseTensor.CSRCTensor
extends OnnxSparseTensor.SparseTensor<LongBuffer>
The Java side representation of a CSRC sparse tensor.
-
Constructor Summary
ConstructorsConstructorDescriptionCSRCTensor(LongBuffer outerIndices, LongBuffer innerIndices, Buffer values, long[] denseShape, OnnxJavaType type, long numNonZero) Creates a CSRC sparse tensor suitable for constructing an ORT Sparse Tensor. -
Method Summary
Modifier and TypeMethodDescriptionThe indices type of the sparse tensor.Gets the inner indices buffer.long[]Gets the shape of the inner indices.The sparsity type of the sparse tensor.Methods inherited from class ai.onnxruntime.OnnxSparseTensor.SparseTensor
getDenseShape, getIndices, getIndicesShape, getNumNonZeroElements, getType, getValues, getValuesShape
-
Constructor Details
-
CSRCTensor
public CSRCTensor(LongBuffer outerIndices, LongBuffer innerIndices, Buffer values, long[] denseShape, OnnxJavaType type, long numNonZero) Creates a CSRC sparse tensor suitable for constructing an ORT Sparse Tensor.- Parameters:
outerIndices- The outer indices.innerIndices- The inner indices.values- The data.denseShape- The dense shape.type- The data type.numNonZero- The number of non-zero elements.
-
-
Method Details
-
getInnerIndicesShape
public long[] getInnerIndicesShape()Gets the shape of the inner indices.- Returns:
- The inner indices shape.
-
getInnerIndices
Gets the inner indices buffer.- Returns:
- The inner indices buffer.
-
getIndicesType
Description copied from class:OnnxSparseTensor.SparseTensorThe indices type of the sparse tensor.Only
OnnxJavaType.INT32andOnnxJavaType.INT64are supported.- Specified by:
getIndicesTypein classOnnxSparseTensor.SparseTensor<LongBuffer>- Returns:
- The sparse tensor indices type.
-
getSparsityType
Description copied from class:OnnxSparseTensor.SparseTensorThe sparsity type of the sparse tensor.- Specified by:
getSparsityTypein classOnnxSparseTensor.SparseTensor<LongBuffer>- Returns:
- The sparse tensor sparsity type.
-