jik876 / hifi-gan

HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis
MIT License
1.92k stars 506 forks source link

Why set the train_loader's shuffle is False ? #77

Closed yingfenging closed 3 years ago

yingfenging commented 3 years ago

Hello, thanks for your great work. I have a question about the blow code, why set the "shuffle" False ? If set Fasle, the same iteration of every epoch will get the same audio .

    train_loader = DataLoader(trainset, num_workers=h.num_workers, shuffle=False,
                              sampler=train_sampler,
                              batch_size=h.batch_size,
                              pin_memory=True,
                              drop_last=True)

Thank you very much, and look foward to your reply.

jik876 commented 3 years ago

Sorry for the late reply. Thanks for your interest. MelDataset and DistributedSampler shuffle the data. Please refer to lines 76 and 81.

PussyCat0700 commented 4 months ago

In single gpu mode DistributedSampler should not be able to do shuffling, so I think it won't work for single GPU here when h.num_gpus==1?

Sorry for the late reply. Thanks for your interest. MelDataset and DistributedSampler shuffle the data. Please refer to lines 76 and 81.