set_origin_shape

Applicable Products

All processors

Function Usage

Sets the original shape of a tensor into TensorDesc. The shape refers to that of the original network model.

Prototype

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

Parameters

Parameter

Input/Output

Description

shape

Input

Original 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.