Shortcuts

torch.Tensor.is_floating_point

Tensor.is_floating_point() bool

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

优云智算