torch.is_floating_point
- torch.is_floating_point(input)
-
如果
input
的数据类型是浮点数类型(即torch.float64
、torch.float32
、torch.float16
或torch.bfloat16
之一),则返回 True。- 参数
-
input (Tensor) – 需要输入的张量。
如果 input
的数据类型是浮点数类型(即 torch.float64
、torch.float32
、torch.float16
或 torch.bfloat16
之一),则返回 True。
input (Tensor) – 需要输入的张量。