快捷方式

torch.is_floating_point

torch.is_floating_point(input)

如果 input 的資料型別是浮點資料型別(即 torch.float64torch.float32torch.float16torch.bfloat16 之一),則返回 True。

引數

input (Tensor) – 輸入張量。

文件

訪問全面的 PyTorch 開發者文件

檢視文件

教程

獲取適用於初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源