torch.is_floating_point — PyTorch 2.7 documentation (original) (raw)
Shortcuts
torch.is_floating_point(input)¶
Returns True if the data type of input
is a floating point data type i.e., one of torch.float64
, torch.float32
, torch.float16
, and torch.bfloat16
.
Parameters
input (Tensor) – the input tensor.
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.