torchcvnn.transforms.Normalize

class torchcvnn.transforms.Normalize(means, covs, eps=1e-12)[source]

Per-channel 2x2 normalization of [Re, Im]. This transform normalizes complex-valued input data by centering and scaling it. It supports both numpy arrays and PyTorch tensors as input. :param means: Per-channel means for centering. Shape (C, 2) where C is number of channels. :type means: array-like :param covs: Per-channel 2x2 covariance matrices for scaling. Shape (C, 2, 2).

Covariance matrices must be symmetric positive definite.

Returns:

Normalized data with same shape as input.

Each channel is independently centered and scaled.

Return type:

np.ndarray | torch.Tensor

Example

>>> means = [[0,0], [1,1]]
>>> covs = [[[1,0],[0,1]], [[2,0],[0,2]]]
>>> transform = Normalize(means, covs)
>>> output = transform(input_data)  # Normalizes each channel independently
__init__(means, covs, eps=1e-12)[source]

Methods

__init__(means, covs[, eps])