Shape Constructor

Applicable Products

All processors

Function Usage

Creates a shape object.

Prototype

1
Shape(dims: Optional[List[int]] = None)

Parameters

Parameter

Input/Output

Description

dims

Input

Shape value. Shape indicates the dimension size of the tensor data. List[int] indicates the size of each dimension.

Returns

Shape object

Restrictions

If dims is not an integer list, TypeError is thrown.