torchcvnn.transforms.Amplitude

class torchcvnn.transforms.Amplitude(dtype: str)[source]

Transform a complex-valued tensor into its amplitude/magnitude.

This transform computes the absolute value (magnitude) of complex input data, converting complex values to real values.

Parameters:

dtype (str) – Data type for the output (‘float32’, ‘float64’, etc)

Returns:

Real-valued tensor containing the amplitudes,

with same shape as input but real-valued type specified by dtype.

Return type:

np.ndarray | torch.Tensor

__init__(dtype: str) None[source]

Methods

__init__(dtype)