reshape

Applicable Products

Product

Supported

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Reshapes a tensor without changing the tensor content.

Prototype

1
def reshape(self, shape: Union[List[int], Tuple[int]])

Parameters

Parameter

Input/Output

Description

shape

Input

Target shape to be changed.

The number of elements of shape before and after reshaping must be the same.

Returns

Exception Handling

None

Constraints

If reshaping is performed on the input, other nodes that use the input may be affected.