Closed ductuantruong closed 1 year ago
I think one simple method is to re-define your collate_fn
in the dataloader, and filter the training samples of the same spk_id with a batch. Although the actual batch_size could be a little smaller after filtering, the training process should be normal.
You can refer our similar usage of customized collate_fn
in ssl/dataset.py. Hope this solve your problem.
Thank you for your suggestion! I will try that.
Then if I want to use triplet loss and a batch contains N speakers with M different utts for each speaker, can I modify your data sampler?
Hi Wespeaker team,
Thank you for sharing your amazing work. I am trying to use your work in my research. However, I am not familiar with the data sampler using your toolkit. Could I ask how to modify your data sampler so that in a mini-batch, each training sample has a different speaker_id (no duplicate speaker_id in a mini-batch)?
Thank you for your support!