ga642381 / FastSpeech2

Multi-Speaker Pytorch FastSpeech2: Fast and High-Quality End-to-End Text to Speech :fist:
92 stars 16 forks source link

Division by Zero #3

Closed Vadim2S closed 2 years ago

Vadim2S commented 3 years ago

VCTK corpus, not all words present.

step : 1000 Epoch [1/1000], Step [1000/2688000]: Total Loss: 2.4196, Mel Loss: 0.2047, Mel PostNet Loss: 0.2929, Duration Loss: 0.3105, F0 Loss: 72.4894, Energy Loss: 8.8656; Time Used: 300.306s, Estimated Time Remaining: 781687.842s. step : 2000 Epoch [1/1000], Step [2000/2688000]: Total Loss: 1.8951, Mel Loss: 0.1795, Mel PostNet Loss: 0.1984, Duration Loss: 0.2650, F0 Loss: 48.0024, Energy Loss: 7.7215; Time Used: 598.532s, Estimated Time Remaining: 686206.710s. step: 2000 , length 249, tensor([249, 363, 264, 352, 281, 264, 221, 275, 264, 221, 307, 277, 298, 266, 286, 268], device='cuda:0') Traceback (most recent call last): File "train.py", line 265, in main(args) File "train.py", line 239, in main d_l, f_l, e_l, m_l, m_p_l = evaluate(model, current_step) File "/home/FastSpeech2/evaluate.py", line 115, in evaluate d_l = sum(d_l) / len(d_l) ZeroDivisionError: division by zero

Vadim2S commented 3 years ago

Additional information:

1) /data/vctk.py do not append dictors for evaluate to val[]. Code just commented. 2) preprocess.py write empty val.txt file 2) evaluate.py try make dataset for empty val.txt file 3) evaluate.py try "for ... in dataset". And do nothing (must do d_l.append) 4) just after "do nothing for" evaluate.py execute "d_l = sum(d_l) / len(d_l)" where d_l is empty.

Conclusion: project do not work with VCTK yet

Workaround: uncomment code in /data/vctk.py and add dictors to val[] manually.

ga642381 commented 3 years ago

Thanks for the feedback! I will fix it to let it work well with VCTK ASAP!