pheepa / DCUnet

Phase-aware speech enchancement with Deep Complex U-Net
94 stars 19 forks source link

Why the real and imaginary number are subtracted and added together to make the output? #9

Open kronee0516 opened 4 months ago

kronee0516 commented 4 months ago

Can't understand what is happening Is that some kind of theory need to do that?

one more question what is the pytorch version you use? i encountered different errors when about start to train

pheepa commented 4 months ago

Hi Referring to the article

Complex-valued Building Blocks. Given a complex-valued convolutional filter W = A+iB with real-valued matrices A and B, the complex convolution operation on complex vector h = x + iy with W is done by W ∗h = (A∗x−B ∗y)+i(B ∗x+A∗y)

Basically, it's just a way of multiplying complex numbers: (a + ib) (c + id) = ac + iad + ibc + i2bd ⇒ (a + ib) (c + id) = (ac - bd) + i(ad + bc) [Because i2 = -1]

Unfortunately, it is impossible to find out which pytorch version I used (no artefacts like requirements.txt left) because at that time I did not have enough experience to write reproducible code. In any case, you can share your errors and we will try to solve them, it can be usefull for someone.