SetDimNum

Description

Sets the dimension count of a shape.

Prototype

void SetDimNum(const size_t dim_num)

Parameters

Parameter

Input/Output

Description

dim_num

Input

Dimension count of a shape

Returns

None

Restrictions

None

Example

Shape shape0({3, 256, 256});
shape0.SetDimNum(1);
auto dim_num = shape0.GetDimNum(); // 1