torch.is_floating_point
- torch.is_floating_point(input)
Returns True if the data type of
input
is a floating point data type i.e., one oftorch.float64
,torch.float32
,torch.float16
, andtorch.bfloat16
.- Parameters
input (Tensor) – the input tensor.