TypeError: can't convert np.ndarray of type numpy.complex128. The only supported types are: double, float, float16, int64, int32, and uint8.
code:
Test_data = torch.from_numpy(np.array(Test_data)).type(torch.complex64)
改 code:
Test_data = torch.tensor(Test_data, dtype = torch.complex64)
新的Error:
RuntimeError: Cannot register complex types without loading a library with complex support
Integrating complex tensors · Issue #755 · pytorch/pytorch · GitHub
解决办法 __init__.py