commit
75d21580cf
2
train.py
2
train.py
|
@ -99,7 +99,7 @@ def run(rank, n_gpus, hps):
|
|||
name=utils.latest_checkpoint_path(hps.model_dir, "D_*.pth")
|
||||
global_step=int(name[name.rfind("_")+1:name.rfind(".")])+1
|
||||
#global_step = (epoch_str - 1) * len(train_loader)
|
||||
except: # noqa: E722 I have no idea about this CC: @ylzz1997
|
||||
except Exception:
|
||||
print("load old checkpoint failed...")
|
||||
epoch_str = 1
|
||||
global_step = 0
|
||||
|
|
4
utils.py
4
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: # noqa: E722 I have no idea about this CC: @ylzz1997
|
||||
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: # noqa: E722
|
||||
except Exception:
|
||||
info = traceback.format_exc()
|
||||
print(info)
|
||||
n_ivf = min(int(16 * np.sqrt(big_npy.shape[0])), big_npy.shape[0] // 39)
|
||||
|
|
Loading…
Reference in New Issue