From 1ffcc22ab98f5b7b07d6266b1c67dfb9fc6f02b2 Mon Sep 17 00:00:00 2001 From: RichieHakim Date: Tue, 7 May 2024 16:44:07 -0400 Subject: [PATCH] make torch_ppc a torch jit script function --- bnpm/spectral.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bnpm/spectral.py b/bnpm/spectral.py index 5c126e0..b99f759 100644 --- a/bnpm/spectral.py +++ b/bnpm/spectral.py @@ -906,6 +906,7 @@ def ppc(phases, axis=None): return ((cosSum**2 + sinSum**2) - N) / (N * (N - 1)) +@torch.jit.script def torch_ppc(phases: torch.Tensor, axis: Optional[List[int]] = None): """ Exactly the same as ``ppc`` but works with torch.jit.script.