torch.Tensor.reshape
- Tensor.reshape(*shape) → Tensor
Returns a tensor with the same data and number of elements as
selfbut with the specified shape. This method returns a view ifis compatible with the current shape. See on when it is possible to return a view.