捷徑

leaky_relu

class torch.ao.nn.quantized.functional.leaky_relu(input, negative_slope=0.01, inplace=False, scale=None, zero_point=None)[source][source]

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

逐元素 (element-wise) 運算,LeakyReLU(x)=max(0,x)+negative_slopemin(0,x)\text{LeakyReLU}(x) = \max(0, x) + \text{negative\_slope} * \min(0, x)

參數
  • input (Tensor) – 量化的輸入

  • negative_slope (float) – 負輸入的斜率

  • inplace (bool) – 是否就地 (Inplace) 修改輸入張量

  • scale (Optional[float]) – 輸出張量的縮放比例 (scale) 和零點 (zero point)。

  • zero_point (Optional[int]) – 輸出張量的縮放比例 (scale) 和零點 (zero point)。

詳情請參閱 LeakyReLU

文件

取得 PyTorch 的完整開發者文件

檢視文件

教學課程

取得針對初學者和進階開發者的深入教學課程

檢視教學課程

資源

尋找開發資源並獲得您問題的解答

檢視資源