捷徑

torch.nn.functional.softmin

torch.nn.functional.softmin(input, dim=None, _stacklevel=3, dtype=None)[原始碼][原始碼]

應用 softmin 函數。

請注意,Softmin(x)=Softmax(x)\text{Softmin}(x) = \text{Softmax}(-x)。有關數學公式,請參閱 softmax 的定義。

有關更多詳細信息,請參閱Softmin

參數
  • input (Tensor) – 輸入

  • dim (int) – 將計算 softmin 的維度 (因此沿 dim 的每個切片總和為 1)。

  • dtype (torch.dtype, optional) – 返回 tensor 的期望數據類型。 如果指定,則在執行操作之前,輸入 tensor 會被轉換為 dtype。 這對於防止數據類型溢出很有用。 預設值:None。

返回類型

Tensor

文件

獲取 PyTorch 的完整開發者文檔

查看文檔

教程

獲取針對初學者和高級開發人員的深入教程

查看教程

資源

查找開發資源並獲取問題解答

查看資源