快捷方式

torch.is_floating_point

torch.is_floating_point(input)

如果 input 的資料類型是浮點數資料類型 (即 torch.float64torch.float32torch.float16torch.bfloat16 其中之一),則傳回 True。

參數

input (Tensor) – 輸入張量。

文件

取得 PyTorch 的完整開發者文件

檢視文件

教學

取得適用於初學者和進階開發者的深入教學

檢視教學

資源

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

檢視資源