set_shape

Applicable Products

All processors

Function Usage

Sets the tensor shape of TensorDesc.

Prototype

1
set_shape(shape: List[int]) -> TensorDesc

Parameters

Parameter

Input/Output

Description

shape

Input

New tensor shape, which is of the list[int] type. A shape object can be passed.

Returns

(TensorDesc) Returns itself to support chain calls.

Restrictions

If shape is not a list of integers, TypeError is thrown.