nvidia.dali.fn.preemphasis_filter — NVIDIA DALI (original) (raw)
nvidia.dali.fn.preemphasis_filter(__input, /, *, border='clamp', bytes_per_sample_hint=[0], dtype=DALIDataType.FLOAT, preemph_coeff=0.97, preserve=False, device=None, name=None)#
Applies preemphasis filter to the input data.
This filter, in simple form, can be expressed by the formula:
Y[t] = X[t] - coeff * X[t-1] if t > 1 Y[t] = X[t] - coeff * X_border if t == 0
with X
and Y
being the input and output signal, respectively.
The value of X_border
depends on the border argument:
X_border = 0 if border_type == 'zero' X_border = X[0] if border_type == 'clamp' X_border = X[1] if border_type == 'reflect'
Supported backends
- ‘cpu’
- ‘gpu’
Parameters:
__input¶ (TensorList) – Input to the operator.
Keyword Arguments:
- border¶ (str, optional, default = ‘clamp’) – Border value policy. Possible values are "zero", "clamp", "reflect".
- bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) –
Output size hint, in bytes per sample.
If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size. - dtype¶ (nvidia.dali.types.DALIDataType, optional, default = DALIDataType.FLOAT) – Data type for the output.
- preemph_coeff¶ (float or TensorList of float, optional, default = 0.97) – Preemphasis coefficient
coeff
. - preserve¶ (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.