Skip to content

Commit 2a59602

Browse files
committed
fix: wrong operator
1 parent 4c2374d commit 2a59602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fft_conv_pytorch/fft_conv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def complex_matmul(a: Tensor, b: Tensor, groups: int = 1) -> Tensor:
2121

2222
# complex value matrix multiplication
2323
real = a.real @ b.real - a.imag @ b.imag
24-
imag = a.imag @ b.real - a.real @ b.imag
24+
imag = a.imag @ b.real + a.real @ b.imag
2525
real = torch.movedim(real, real.dim() - 1, 2).squeeze(-1)
2626
imag = torch.movedim(imag, imag.dim() - 1, 2).squeeze(-1)
2727
c = torch.zeros(real.shape, dtype=torch.complex64, device=a.device)

0 commit comments

Comments
 (0)