# torch.Tensor.reshape¶

Tensor.reshape(*shape)

Returns a tensor with the same data and number of elements as self but with the specified shape. This method returns a view if shape is compatible with the current shape. See torch.Tensor.view() on when it is possible to return a view.

Parameters:

shape (tuple of ints or int...) – the desired shape