Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
#tomcattwo edited synthesizer\train.py per issue CorentinJ#669 and blue-fish/Real-Time-Voice-Cloning@89a9964 to fix Win10 pickle issue
  • Loading branch information
Tomcattwo authored Sep 1, 2021
1 parent 95adc69 commit 18cbd87
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions synthesizer/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from pathlib import Path
import sys
import time
#tomcattwo added below line per issue #669 and blue-fish/Real-Time-Voice-Cloning@89a9964 to fix Win10 pickle issue
import platform


def np_now(x: torch.Tensor): return x.detach().cpu().numpy()
Expand Down Expand Up @@ -142,11 +144,12 @@ def train(run_id: str, syn_dir: str, models_dir: str, save_every: int,

for p in optimizer.param_groups:
p["lr"] = lr


#tomcattwo changed line 152 below per issue #669 and blue-fish/Real-Time-Voice-Cloning@89a9964 to fix Win10 pickle issue
data_loader = DataLoader(dataset,
collate_fn=lambda batch: collate_synthesizer(batch, r, hparams),
batch_size=batch_size,
num_workers=2,
num_workers=2 if platform.system() != "Windows" else 0,
shuffle=True,
pin_memory=True)

Expand Down

0 comments on commit 18cbd87

Please sign in to comment.