mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 02:51:09 +00:00
big_npy should be shuffled (#218)
This commit is contained in:
@@ -670,6 +670,9 @@ def train_index(exp_dir1):
|
|||||||
phone = np.load("%s/%s" % (feature_dir, name))
|
phone = np.load("%s/%s" % (feature_dir, name))
|
||||||
npys.append(phone)
|
npys.append(phone)
|
||||||
big_npy = np.concatenate(npys, 0)
|
big_npy = np.concatenate(npys, 0)
|
||||||
|
big_npy_idx = np.arange(big_npy.shape[0])
|
||||||
|
np.random.shuffle(big_npy_idx)
|
||||||
|
big_npy = big_npy[big_npy_idx]
|
||||||
np.save("%s/total_fea.npy" % exp_dir, big_npy)
|
np.save("%s/total_fea.npy" % exp_dir, big_npy)
|
||||||
# n_ivf = big_npy.shape[0] // 39
|
# n_ivf = big_npy.shape[0] // 39
|
||||||
n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
|
n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
|
||||||
@@ -892,6 +895,9 @@ def train1key(
|
|||||||
phone = np.load("%s/%s" % (feature_dir, name))
|
phone = np.load("%s/%s" % (feature_dir, name))
|
||||||
npys.append(phone)
|
npys.append(phone)
|
||||||
big_npy = np.concatenate(npys, 0)
|
big_npy = np.concatenate(npys, 0)
|
||||||
|
big_npy_idx = np.arange(big_npy.shape[0])
|
||||||
|
np.random.shuffle(big_npy_idx)
|
||||||
|
big_npy = big_npy[big_npy_idx]
|
||||||
np.save("%s/total_fea.npy" % exp_dir, big_npy)
|
np.save("%s/total_fea.npy" % exp_dir, big_npy)
|
||||||
# n_ivf = big_npy.shape[0] // 39
|
# n_ivf = big_npy.shape[0] // 39
|
||||||
n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
|
n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
|
||||||
|
|||||||
Reference in New Issue
Block a user