You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the something weird issue in your code when I use mixed precision, autocast() function.
I add just simple mixed precision code into your code like below:
for num, (data, labels) in enumerate(loader, start = 1):
self.zero_grad()
labels = torch.LongTensor(labels).cuda()
# speaker_embedding = self.speaker_encoder.forward(data.cuda(), aug = True)
# nloss, prec = self.speaker_loss.forward(speaker_embedding, labels)
# nloss.backward()
# self.optim.step()
if self.mixedprec:
with autocast():
speaker_embedding = self.speaker_encoder.forward(data.cuda(), aug = True)
nloss, prec = self.speaker_loss.forward(speaker_embedding, labels)
self.scaler.scale(nloss).backward()
self.scaler.step(self.optim)
self.scaler.update()
else:
speaker_embedding = self.speaker_encoder.forward(data.cuda(), aug = True)
nloss, prec = self.speaker_loss.forward(speaker_embedding, labels)
nloss.backward()
self.optim.step()
I found that if I trained ECAPA-TDNN with mixed precision, then your ecapa_tdnn throw nan value of embedding and it makes NaN value within score variable.
Finally, evaluation code couldn't calculate eer and minDCF score.
Can I discuss this issue with you?
I want to get a some cue from you who are made this code.
Thanks
Best regards
The text was updated successfully, but these errors were encountered:
Hi,
Thanks to share your repository.
I found the something weird issue in your code when I use mixed precision, autocast() function.
I add just simple mixed precision code into your code like below:
I found that if I trained ECAPA-TDNN with mixed precision, then your ecapa_tdnn throw nan value of embedding and it makes NaN value within score variable.
Finally, evaluation code couldn't calculate eer and minDCF score.
Can I discuss this issue with you?
I want to get a some cue from you who are made this code.
Thanks
Best regards
The text was updated successfully, but these errors were encountered: