torch.is_complex

torch.is_complex(input)

如果 input 的数据类型是复数类型(即 torch.complex64torch.complex128 之一),则返回 True。

参数

input (Tensor) – 需要输入的张量。

本页目录