Tensor Views — PyTorch 1.10.1 documentation
pytorch.org › docs › stableTensor Views. PyTorch allows a tensor to be a View of an existing tensor. View tensor shares the same underlying data with its base tensor. Supporting View avoids explicit data copy, thus allows us to do fast and memory efficient reshaping, slicing and element-wise operations. For example, to get a view of an existing tensor t, you can call t ...
torch.view_as_complex — PyTorch 1.10.1 documentation
pytorch.org › docs › stableview_as_complex () is only supported for tensors with torch.dtype torch.float64 and torch.float32. The input is expected to have the last dimension of size 2. In addition, the tensor must have a stride of 1 for its last dimension. The strides of all other dimensions must be even numbers. Parameters. input ( Tensor) – the input tensor.