diff --git a/utils.py b/utils.py index 27cee07..5b2bea9 100644 --- a/utils.py +++ b/utils.py @@ -164,7 +164,7 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False # print("load", k) new_state_dict[k] = saved_state_dict[k] 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) logger.info("%s is not in the checkpoint" % k) 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) .cluster_centers_ ) - except ValueError: + except Exception: info = traceback.format_exc() print(info) n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)