# reshape¶

Graph.reshape(tensor, shape, *, name=None)

Reshape a tensor into a new shape, keeping the order of its elements.

Parameters
• tensor (np.ndarray or Tensor) – The tensor you want to reshape.

• shape (tuple[int]) – The new shape of the tensor.

• name (str, optional) – The name of the node.

Returns

The reshaped tensor.

Return type

Tensor