Update utils.py
This commit is contained in:
parent
136b230850
commit
d2ae02c24e
4
utils.py
4
utils.py
|
@ -164,7 +164,7 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False
|
||||||
# print("load", k)
|
# print("load", k)
|
||||||
new_state_dict[k] = saved_state_dict[k]
|
new_state_dict[k] = saved_state_dict[k]
|
||||||
assert saved_state_dict[k].shape == v.shape, (saved_state_dict[k].shape, v.shape)
|
assert saved_state_dict[k].shape == v.shape, (saved_state_dict[k].shape, v.shape)
|
||||||
except AssertionError:
|
except Exception:
|
||||||
print("error, %s is not in the checkpoint" % k)
|
print("error, %s is not in the checkpoint" % k)
|
||||||
logger.info("%s is not in the checkpoint" % k)
|
logger.info("%s is not in the checkpoint" % k)
|
||||||
new_state_dict[k] = v
|
new_state_dict[k] = v
|
||||||
|
@ -483,7 +483,7 @@ def train_index(spk_name,root_dir = "dataset/44k/"): #from: RVC https://github.
|
||||||
.fit(big_npy)
|
.fit(big_npy)
|
||||||
.cluster_centers_
|
.cluster_centers_
|
||||||
)
|
)
|
||||||
except ValueError:
|
except Exception:
|
||||||
info = traceback.format_exc()
|
info = traceback.format_exc()
|
||||||
print(info)
|
print(info)
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue