learning.as_complex

Contents

learning.as_complex#

bartorch.learning.as_complex()#

Complex tensor formed from a leading axis of real and imaginary parts.

Inverse of as_real().

Parameters:

input (torch.Tensor) – Real tensor whose leading axis has length two.

Returns:

Complex tensor of shape input.shape[1:].

Return type:

torch.Tensor