nvidia.dali.fn.preemphasis_filter#

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)#

对输入数据应用预加重滤波器。

此滤波器以简单形式,可以用以下公式表示

Y[t] = X[t] - coeff * X[t-1]    if t > 1
Y[t] = X[t] - coeff * X_border  if t == 0

其中 XY 分别是输入和输出信号。

X_border 的值取决于 border 参数

X_border = 0                    if border_type == 'zero'
X_border = X[0]                 if border_type == 'clamp'
X_border = X[1]                 if border_type == 'reflect'
支持的后端
  • ‘cpu’

  • ‘gpu’

参数:

__input (TensorList) – 操作符的输入。

关键字参数:
  • border (str, optional, default = ‘clamp’) – 边界值策略。可能的值为 "zero"、"clamp"、"reflect"。

  • bytes_per_sample_hint (int 或 list of int, optional, default = [0]) –

    每个样本的输出大小提示(以字节为单位)。

    如果指定,则将预先分配驻留在 GPU 或页锁定主机内存中的操作符输出,以适应此大小的样本批次。

  • dtype (nvidia.dali.types.DALIDataType, optional, default = DALIDataType.FLOAT) – 输出的数据类型。

  • preemph_coeff (float 或 TensorList of float, optional, default = 0.97) – 预加重系数 coeff

  • preserve (bool, optional, default = False) – 阻止操作符从图中删除,即使其输出未使用。