ToComplex#

class deepinv.datasets.utils.ToComplex(*args, **kwargs)[source]#

Bases: Module

Torchvision-style transform to add empty imaginary dimension to image.

Expects tensor of shape (…, H, W) and returns tensor of shape (…, 2, H, W).

forward(x)[source]#

Convert real image to complex image.

Parameters:

x (torch.Tensor) – image tensor of shape (…, H, W)