From 33924d1ce16e4410bc92b1ac104114f1feb2ceb3 Mon Sep 17 00:00:00 2001 From: Shakiba Kheradmand Date: Sat, 29 Jun 2024 21:32:51 -0700 Subject: [PATCH] clamp N --- utils/reloc_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/reloc_utils.py b/utils/reloc_utils.py index 8cb965b..8e0658b 100644 --- a/utils/reloc_utils.py +++ b/utils/reloc_utils.py @@ -9,4 +9,5 @@ for n in range(N_max): binoms[n, k] = math.comb(n, k) def compute_relocation_cuda(opacity_old, scale_old, N): + N.clamp_(min=1, max=N_max-1) return compute_relocation(opacity_old, scale_old, N, binoms, N_max) \ No newline at end of file