Leaky ReLU

classtorch.ao.nn.quantized.functional.leaky_relu(input, negative_slope=0.01, inplace=False, scale=None, zero_point=None)[源代码]

leaky_relu(input, negative_slope=0.01, inplace=False, scale, zero_point) 的量化版本 -> Tensor

逐元素应用公式:$\text{LeakyReLU}(x) = \max(0, x) + \text{negative\_slope} * \min(0, x)$

参数
  • input (Tensor) – 输入张量的量化版本

  • negative_slope (float) – 负输入的斜率值

  • inplace (bool) — 是否直接修改输入张量

  • scale (Optional[float]) – 输出张量的缩放比例和偏移零点。

  • zero_point (Optional[int]) – 输出张量的缩放因子和零点。

更多详情请参见LeakyReLU

本页目录