From 46e9334c3150c942de0a57de3381c19d9db309ed Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期二, 23 一月 2024 15:46:37 +0800
Subject: [PATCH] update TimestampSentence
---
funasr/models/campplus/cluster_backend.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/funasr/models/campplus/cluster_backend.py b/funasr/models/campplus/cluster_backend.py
index 3bac0a0..e33a14d 100644
--- a/funasr/models/campplus/cluster_backend.py
+++ b/funasr/models/campplus/cluster_backend.py
@@ -119,6 +119,7 @@
self.metric = metric
def __call__(self, X):
+ from umap.umap_ import UMAP
umap_X = umap.UMAP(
n_neighbors=self.n_neighbors,
min_dist=0.0,
@@ -156,6 +157,7 @@
if X.shape[0] < 20:
return np.zeros(X.shape[0], dtype='int')
if X.shape[0] < 2048 or k is not None:
+ # unexpected corner case
labels = self.spectral_cluster(X, k)
else:
labels = self.umap_hdbscan_cluster(X)
--
Gitblit v1.9.1