评价此页

torch.Tensor.is_floating_point#

Tensor.is_floating_point() bool#

如果 self 的数据类型是浮点数据类型,则返回 True。