Reshape

Applicability

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
int32_t Reshape(const std::vector<int64_t> &shape)

Command-Line Options

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

  • 0: success
  • other: FAILED. For details, see the error code.

Troubleshooting

None

Constraints

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