Class Type

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class Type : public mindspore::api::Value

Type defines the type of a value.

Subclassed by mindspore::api::TensorType

Public Functions

TypeId type_id() const

Get the id of the Type object.

返回

The id of the Type object.

TypeId number_type() const

Get the number type of the Type object.

返回

The number type of this Type object, kTypeUnknown if this is not a number type.

Public Static Functions

static TypePtr GetType(TypeId id)

Get the Type according to a TypeId.

参数

id[in] The id of the type.

返回

The pointer to the Type.

static size_t GetSize(TypeId id)

Get data size in bytes for the type according to a TypeId.

参数

id[in] The id of the type.

返回

The data size in bytes for the Type.