Loss is NaN on first step, if data exceeds 100 sentences
MHamzaAhmad opened this issue · comments
Muhammad Hamza commented
Loss is NaN on first step, if data exceeds 100 sentences
Blaz Jurisic commented
same issue here
mmehiretu2019 commented
I'm running into this issue as well. Did anyone figure out what the solution is?
Ashishkumar Gudmalwar commented
@BlazJurisic and others: NaN values error may be due to pytorch version. You can check the in model.py code in tacotron2 folder. In that, check decode class, def forward, if you are using torch 1.7 then just change that as below:
#memory, mask=~get_mask_from_lengths(memory_lengths))
memory, mask=torch.logical_not(get_mask_from_lengths(memory_lengths)).type(torch.uint8)) # Use instead for torch 1.7
Hope it helps.