functional_mask_along_axis_iid: Mask Along Axis IID (functional)

functional_mask_along_axis_iidR Documentation

Mask Along Axis IID (functional)

Description

Apply a mask along axis. Mask will be applied from indices [v_0, v_0 + v), where v is sampled from uniform (0, mask_param), and v_0 from uniform(0, max_v - v).

Usage

functional_mask_along_axis_iid(specgrams, mask_param, mask_value, axis)

Arguments

specgrams

(Tensor): Real spectrograms (batch, channel, freq, time)

mask_param

(int): Number of columns to be masked will be uniformly sampled from [0, mask_param]

mask_value

(float): Value to assign to the masked columns

axis

(int): Axis to apply masking on (3 -> frequency, 4 -> time)

Value

tensor: Masked spectrograms of dimensions (batch, channel, freq, time)


torchaudio documentation built on Feb. 16, 2023, 9:41 p.m.