Class CSRTensor
Defined in File tensor.h
Inheritance Relationships
Base Type
public mindspore::tensor::MetaSparseTensor
Class Documentation
-
class CSRTensor : public mindspore::tensor::MetaSparseTensor
Public Functions
-
CSRTensor(const TensorPtr indptr, const TensorPtr indices, const TensorPtr values, const ShapeVector &shape)
Create CSRTensor with given data type from another tensor.
- Parameters
indptr – [in] [Tensor] The indices pointer.
indices – [in] [Tensor] The indices.
values – [in] [Tensor] The values.
shape – [in] The shape represented by ShapeVector of the CSRensor.
-
~CSRTensor() override = default
Destructor of CSRTensor.
-
inline TensorPtr GetIndptr()
Gets CSRTensor’s indptr.
- Returns
[TensorPtr] The indices pointer.
-
inline TensorPtr GetIndices()
Gets CSRTensor’s indices.
- Returns
[TensorPtr] The indices.
-
inline TensorPtr GetValues()
Gets CSRTensor’s values.
- Returns
[TensorPtr] The values.
-
std::string ToString() const override
Get display information of this Tensor.
- Returns
The display information of this Tensor.
-
CSRTensor(const TensorPtr indptr, const TensorPtr indices, const TensorPtr values, const ShapeVector &shape)