mindspore.dataset.audio.MaskAlongAxis
- class mindspore.dataset.audio.MaskAlongAxis(mask_start, mask_width, mask_value, axis)[源代码]
Apply a mask along axis. Mask will be applied from indices [mask_start, mask_start + mask_width).
- Parameters
Examples
>>> import numpy as np >>> >>> waveform = np.random.random([1, 20, 20]) >>> numpy_slices_dataset = ds.NumpySlicesDataset(data=waveform, column_names=["audio"]) >>> transforms = [audio.MaskAlongAxis(0, 10, 0.5, 1)] >>> numpy_slices_dataset = numpy_slices_dataset.map(operations=transforms, input_columns=["audio"])