Package ai.onnxruntime
Class OnnxSparseTensor.BlockSparseTensor
java.lang.Object
ai.onnxruntime.OnnxSparseTensor.SparseTensor<IntBuffer>
ai.onnxruntime.OnnxSparseTensor.BlockSparseTensor
- Enclosing class:
- OnnxSparseTensor
public static final class OnnxSparseTensor.BlockSparseTensor
extends OnnxSparseTensor.SparseTensor<IntBuffer>
The Java side representation of a block sparse tensor.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockSparseTensor(IntBuffer indices, long[] indicesShape, Buffer values, long[] valuesShape, long[] denseShape, OnnxJavaType type, long numNonZero) Construct a block sparse tensor. -
Method Summary
Modifier and TypeMethodDescriptionThe indices type of the sparse tensor.The sparsity type of the sparse tensor.Methods inherited from class ai.onnxruntime.OnnxSparseTensor.SparseTensor
getDenseShape, getIndices, getIndicesShape, getNumNonZeroElements, getType, getValues, getValuesShape
-
Constructor Details
-
BlockSparseTensor
public BlockSparseTensor(IntBuffer indices, long[] indicesShape, Buffer values, long[] valuesShape, long[] denseShape, OnnxJavaType type, long numNonZero) Construct a block sparse tensor.- Parameters:
indices- The indices.indicesShape- The shape of the indices.values- The data.valuesShape- The shape of the data.denseShape- The dense shape.type- The data type.numNonZero- The number of non-zero elements.
-
-
Method Details
-
getIndicesType
Description copied from class:OnnxSparseTensor.SparseTensorThe indices type of the sparse tensor.Only
OnnxJavaType.INT32andOnnxJavaType.INT64are supported.- Specified by:
getIndicesTypein classOnnxSparseTensor.SparseTensor<IntBuffer>- Returns:
- The sparse tensor indices type.
-
getSparsityType
Description copied from class:OnnxSparseTensor.SparseTensorThe sparsity type of the sparse tensor.- Specified by:
getSparsityTypein classOnnxSparseTensor.SparseTensor<IntBuffer>- Returns:
- The sparse tensor sparsity type.
-