mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
set different seed in gan_dataset when it is multi-workers
This commit is contained in:
@@ -69,7 +69,8 @@ class GANDataset(Dataset):
|
||||
cache acoustic features """
|
||||
|
||||
# set the seed differently for each worker
|
||||
random.seed(torch.utils.data.get_worker_info().seed)
|
||||
if torch.utils.data.get_worker_info():
|
||||
random.seed(torch.utils.data.get_worker_info().seed)
|
||||
|
||||
if self.return_segments:
|
||||
item1 = self.load_item(idx)
|
||||
|
||||
Reference in New Issue
Block a user