torch.complex — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.complex. torch.complex(real, imag, *, out=None) → Tensor. Constructs a complex tensor with its real part equal to real and its imaginary part equal to imag. Parameters. real ( Tensor) – The real part of the complex tensor. Must be float or double. imag ( Tensor) – The imaginary part of the complex tensor. Must be same dtype as real.