wavefrontshaping / complexPyTorch

A high-level toolbox for using complex valued neural networks in PyTorch
MIT License
610 stars 148 forks source link

dropout need to set mask's device same as input Tensor! #24

Closed XIronMan0220 closed 11 months ago

wootommy commented 1 year ago

Meet the same problem!

... line 106, in complex_dropout
    return mask*input
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
wavefrontshaping commented 1 year ago

complexPyTorch is obsolete and not maintained as since version 1.7 PyTorch natively supports complex numbers.

XIronMan0220 commented 1 year ago

complexPyTorch is obsolete and not maintained as since version 1.7 PyTorch natively supports complex numbers.

But many modules in PyTorch is still not support complex numbers.

wavefrontshaping commented 1 year ago

My bad, I have to admit I did not touch PyTorch for a while, I assume the integration of complex numbers meant all was implemented. What is missing?

wavefrontshaping commented 1 year ago

Should be solved now (commit 7f611aa5760bc86f43e11721a1f8d9dc09ef699a)