mindspore.dataset.audio.transforms.ComplexNorm
- class mindspore.dataset.audio.transforms.ComplexNorm(power=1.0)[source]
Compute the norm of complex tensor input.
- Parameters
power (float, optional) – Power of the norm, which must be non-negative (default=1.0).
Examples
>>> import numpy as np >>> >>> waveform = np.random.random([2, 4, 2]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.ComplexNorm()] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])