Fix dir_exits error
This commit is contained in:
@@ -49,7 +49,7 @@ def get_bert_feature(
|
|||||||
style_res = torch.cat(style_res["hidden_states"][-3:-2], -1)[0].cpu()
|
style_res = torch.cat(style_res["hidden_states"][-3:-2], -1)[0].cpu()
|
||||||
style_res_mean = style_res.mean(0)
|
style_res_mean = style_res.mean(0)
|
||||||
|
|
||||||
assert len(word2ph) == len(text) + 2
|
assert len(word2ph) == len(text) + 2, text
|
||||||
word2phone = word2ph
|
word2phone = word2ph
|
||||||
phone_level_feature = []
|
phone_level_feature = []
|
||||||
for i in range(len(word2phone)):
|
for i in range(len(word2phone)):
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ def initialize(model_name, batch_size, epochs, save_every_steps, bf16_run):
|
|||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
src=model_path,
|
src=model_path,
|
||||||
dst=os.path.join(dataset_path, "models_backup"),
|
dst=os.path.join(dataset_path, "models_backup"),
|
||||||
|
dirs_exist_ok=True,
|
||||||
)
|
)
|
||||||
shutil.rmtree(model_path)
|
shutil.rmtree(model_path)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user