torch.is_complex
- torch.is_complex(input)
-
如果
input
的数据类型是复数类型(即torch.complex64
或torch.complex128
之一),则返回 True。- 参数
-
input (Tensor) – 需要输入的张量。
如果 input
的数据类型是复数类型(即 torch.complex64
或 torch.complex128
之一),则返回 True。
input (Tensor) – 需要输入的张量。