From bb610c5805e9d033b5d1afb4fbf908158b886e38 Mon Sep 17 00:00:00 2001 From: YuriHead Date: Wed, 26 Jul 2023 22:22:37 +0800 Subject: [PATCH] fix(fcpe) : windows size 8 to 9 fix(fcpe) : windows size 8 to 9 --- modules/F0Predictor/fcpe/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/F0Predictor/fcpe/model.py b/modules/F0Predictor/fcpe/model.py index 4550ce0..200c2fa 100644 --- a/modules/F0Predictor/fcpe/model.py +++ b/modules/F0Predictor/fcpe/model.py @@ -136,7 +136,7 @@ class FCPE(nn.Module): B, N, _ = y.size() ci = self.cent_table[None, None, :].expand(B, N, -1) confident, max_index = torch.max(y, dim=-1, keepdim=True) - local_argmax_index = torch.arange(0,8).to(max_index.device) + (max_index - 4) + local_argmax_index = torch.arange(0,9).to(max_index.device) + (max_index - 4) local_argmax_index[local_argmax_index<0] = 0 local_argmax_index[local_argmax_index>=self.n_out] = self.n_out - 1 ci_l = torch.gather(ci,-1,local_argmax_index)