janvainer/speedyspeech

ZeroDivisionError when extracting duration

Closed this issue · 2 comments

Hi, when I ran duration_extractor.py, I encountered the following problem:

Traceback (most recent call last):
  File "code/duration_extractor.py", line 534, in <module>
    logdir=logdir
  File "code/duration_extractor.py", line 390, in fit
    valid_losses = self._validate(valid_loader)
  File "code/duration_extractor.py", line 466, in _validate
    self.logger.add_scalar('valid/l1', t_l1 / i, self.epoch)
ZeroDivisionError: float division by zero

Could you help me to solve this problem? Thank you very much.

Solved. The size of the val data shouldn't be less than the batch size.

ths,useful!