upload files
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loade
|
|||||||
|
|
||||||
net_g.train()
|
net_g.train()
|
||||||
net_d.train()
|
net_d.train()
|
||||||
for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers) in enumerate(train_loader):
|
for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers) in enumerate(tqdm(train_loader)):
|
||||||
x, x_lengths = x.cuda(rank, non_blocking=True), x_lengths.cuda(rank, non_blocking=True)
|
x, x_lengths = x.cuda(rank, non_blocking=True), x_lengths.cuda(rank, non_blocking=True)
|
||||||
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(rank, non_blocking=True)
|
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(rank, non_blocking=True)
|
||||||
y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(rank, non_blocking=True)
|
y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(rank, non_blocking=True)
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ def get_hparams(init=True):
|
|||||||
help='JSON file for configuration')
|
help='JSON file for configuration')
|
||||||
parser.add_argument('-m', '--model', type=str, default="pretrained_models",
|
parser.add_argument('-m', '--model', type=str, default="pretrained_models",
|
||||||
help='Model name')
|
help='Model name')
|
||||||
parser.add_argument('-n', '--max_epochs', type=int, default="50",
|
parser.add_argument('-n', '--max_epochs', type=int, default=50,
|
||||||
help='finetune epochs')
|
help='finetune epochs')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ if __name__ == "__main__":
|
|||||||
with open("./configs/finetune_speaker.json", 'r', encoding='utf-8') as f:
|
with open("./configs/finetune_speaker.json", 'r', encoding='utf-8') as f:
|
||||||
hps = json.load(f)
|
hps = json.load(f)
|
||||||
# modify n_speakers
|
# modify n_speakers
|
||||||
hps['data']["n_speakers"] = 999 + len(speaker2id)
|
hps['data']["n_speakers"] = 1000 + len(speaker2id)
|
||||||
# add speaker names
|
# add speaker names
|
||||||
for speaker in speaker_names:
|
for speaker in speaker_names:
|
||||||
hps['speakers'][speaker] = speaker2id[speaker]
|
hps['speakers'][speaker] = speaker2id[speaker]
|
||||||
|
|||||||
Reference in New Issue
Block a user