mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-02-07 06:02:49 +08:00
train index:auto kmeans when feature shape too large
train index:auto kmeans when feature shape too large
This commit is contained in:
parent
e7f204b32e
commit
44426b18b8
@ -889,8 +889,8 @@ def train_index(exp_dir1, version19):
|
|||||||
big_npy_idx = np.arange(big_npy.shape[0])
|
big_npy_idx = np.arange(big_npy.shape[0])
|
||||||
np.random.shuffle(big_npy_idx)
|
np.random.shuffle(big_npy_idx)
|
||||||
big_npy = big_npy[big_npy_idx]
|
big_npy = big_npy[big_npy_idx]
|
||||||
# if(big_npy.shape[0]>2e5):
|
if(big_npy.shape[0]>2e5):
|
||||||
if(1):
|
# if(1):
|
||||||
infos.append("Trying doing kmeans %s shape to 10k centers."%big_npy.shape[0])
|
infos.append("Trying doing kmeans %s shape to 10k centers."%big_npy.shape[0])
|
||||||
yield "\n".join(infos)
|
yield "\n".join(infos)
|
||||||
try:
|
try:
|
||||||
@ -1143,8 +1143,8 @@ def train1key(
|
|||||||
np.random.shuffle(big_npy_idx)
|
np.random.shuffle(big_npy_idx)
|
||||||
big_npy = big_npy[big_npy_idx]
|
big_npy = big_npy[big_npy_idx]
|
||||||
|
|
||||||
# if(big_npy.shape[0]>2e5):
|
if(big_npy.shape[0]>2e5):
|
||||||
if(1):
|
# if(1):
|
||||||
info="Trying doing kmeans %s shape to 10k centers."%big_npy.shape[0]
|
info="Trying doing kmeans %s shape to 10k centers."%big_npy.shape[0]
|
||||||
print(info)
|
print(info)
|
||||||
yield get_info_str(info)
|
yield get_info_str(info)
|
||||||
|
Loading…
Reference in New Issue
Block a user