Class AbstractRowTensor

Inheritance Relationships

Base Type

Class Documentation

class AbstractRowTensor : public mindspore::abstract::AbstractUndetermined

Class AbstractRowTensor describes a RowTensor’s abstract value.

Public Functions

inline explicit AbstractRowTensor(const AbstractBasePtr &element, const BaseShapePtr &shape = std::make_shared<Shape>())

Constructor of AbstractRowTensor.

Parameters
  • element[in] The abstract which is wrapped to a RowTensor’s abstract value.

  • shape[in] A dimension of the abstract.

inline AbstractRowTensor(const TypePtr &element_type, const ShapeVector &shape)

Constructor of AbstractRowTensor.

Parameters
  • element_type[in] The type of RowTensor.

  • shape[in] A dimension of RowTensor.

~AbstractRowTensor() override = default

Destructor of AbstractRowTensor.

inline  MS_DECLARE_PARENT (AbstractRowTensor, AbstractUndetermined) const AbstractTensorPtr indices() const

Get the indices of RowTensor.

Returns

A pointer to the abstract tensor.

inline void set_indices(const AbstractTensorPtr &indices)

Set the indices for abstract.

Parameters

indices[in] The indices.

inline const AbstractTensorPtr values() const

Get the values.

Returns

A pointer to the abstract tensor.

inline void set_values(const AbstractTensorPtr &values)

Set the values.

Parameters

values[in] The values of tensor.

inline const AbstractTuplePtr dense_shape() const

Get the dense shape.

Returns

A pointer to the tuple of abstracts.

inline void set_dense_shape(const AbstractTuplePtr &dense_shape)

Set the dense shape.

Parameters

dense_shape[in] The dense shape of RowTensor.

virtual TypePtr BuildType() const override

Build the type of the abstract.

Note

Use this function to get the actual type, while track type is not enough accurate.

Returns

A pointer to the Type.

virtual AbstractBasePtr Clone() const override

Clone an abstract from the abstract.

Returns

A pointer to the cloned abstract.

virtual AbstractBasePtr Broaden() const override

Broaden the abstract. It will upgrade the abstract to a higher level.

Returns

A pointer to the broadened abstract.

AbstractBasePtr BroadenWithShape() const

Broaden the abstract with the shape not changing.

Returns

A pointer to the broadened abstract.

virtual std::string ToString() const override

Get the string representation of this object.

Returns

The string representation.