Class BaseShape

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class BaseShape : public mindspore::Base

BaseShape defines the basic virtual class of NoShape and Shape classes.

Subclassed by mindspore::abstract::NoShape, mindspore::abstract::SequenceShape, mindspore::abstract::Shape

Public Functions

BaseShape() = default

Constructor of BaseShape.

~BaseShape() override = default

Destructor of BaseShape.

MS_DECLARE_PARENT (BaseShape, Base) virtual bool operator

Check whether 2 objects are equal.

Parameters

other[in] Another object.

Returns

True if current object is equal to another, otherwise false.

inline virtual std::size_t hash() const override

Calculate the hash value of BaseShape.

Returns

The hash value of BaseShape.

virtual bool IsDynamic() const = 0

Whether the object’s dimensions are dynamic.

Returns

True if the object’s dimensions are dynamic, otherwise false.

virtual bool IsDimZero() const = 0

Whether the object’s dimension is zero.

Returns

True if the object’s dimension is zero, otherwise false.

virtual bool IsDimUnknown() const = 0

Whether the object’s dimensions are unknown.

Returns

True if the object’s dimensions are unknown, otherwise false.

virtual BaseShapePtr Clone() const = 0

Clone a new object by this one.

Returns

New cloned object.

inline virtual void Broaden()

Broaden the shape.