Skip to content

Commit

Permalink
bug fix in torch hilbert even condition
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Feb 2, 2024
1 parent 3354e76 commit 524e390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion face_rhythm/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2164,7 +2164,7 @@ def torch_hilbert(x, N=None, dim=0):

xf = torch.fft.fft(input=x, n=n, dim=dim)
m = torch.zeros(n, dtype=xf.dtype, device=xf.device)
if n % 2: ## then even
if n % 2 == 0: ## then even
m[0] = m[n//2] = 1
m[1:n//2] = 2
else:
Expand Down

0 comments on commit 524e390

Please sign in to comment.