add validation files into bert generation list
This commit is contained in:
10
bert_gen.py
10
bert_gen.py
@@ -39,8 +39,14 @@ def process_line(line):
|
|||||||
assert bert.shape[-1] == len(phone)
|
assert bert.shape[-1] == len(phone)
|
||||||
torch.save(bert, bert_path)
|
torch.save(bert, bert_path)
|
||||||
|
|
||||||
with open(hps.data.training_files, encoding='utf-8') as f:
|
|
||||||
lines = f.readlines()
|
lines = []
|
||||||
|
with open(hps.data.training_files) as f:
|
||||||
|
lines.extend(f.readlines())
|
||||||
|
|
||||||
|
with open(hps.data.validation_files) as f:
|
||||||
|
lines.extend(f.readlines())
|
||||||
|
|
||||||
|
|
||||||
with Pool(processes=12) as pool: #A100 suitable config,if coom,please decrease the processess number.
|
with Pool(processes=12) as pool: #A100 suitable config,if coom,please decrease the processess number.
|
||||||
for _ in tqdm(pool.imap_unordered(process_line, lines)):
|
for _ in tqdm(pool.imap_unordered(process_line, lines)):
|
||||||
|
|||||||
Reference in New Issue
Block a user