lmnt-com / diffwave

DiffWave is a fast, high-quality neural vocoder and waveform synthesizer.
Apache License 2.0
754 stars 111 forks source link

Trouble starting training #7

Closed moiseshorta closed 3 years ago

moiseshorta commented 3 years ago

Hi,

I'm just starting some experiments with diffwave and so far have run into this persistent error when trying to train:

Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.6/dist-packages/diffwave/__main__.py", line 52, in <module> main(parser.parse_args()) File "/usr/local/lib/python3.6/dist-packages/diffwave/__main__.py", line 39, in main train(args, params) File "/usr/local/lib/python3.6/dist-packages/diffwave/learner.py", line 169, in train _train_impl(0, model, dataset, args, params) File "/usr/local/lib/python3.6/dist-packages/diffwave/learner.py", line 163, in _train_impl learner.train(max_steps=args.max_steps) File "/usr/local/lib/python3.6/dist-packages/diffwave/learner.py", line 104, in train for features in tqdm(self.dataset, desc=f'Epoch {self.step // len(self.dataset)}') if self.is_master else self.dataset: ZeroDivisionError: integer division or modulo by zero

I'm running on Google Colab, my dataset consists of ~6 pieces of audio, each ~4min. long, already preprocessed using diffwave.preprocess function.

Any advice would be of great help, thanks!

krzim commented 3 years ago

I'm sure @moiseshorta solved their issue when they closed this but for anyone else wondering what the solution is: the batch_size parameter defaults to 16 and with only 6 pieces of data, there were 6//16 = 0 batches for training. Lowering the batch size to 6 (or any factor of 6) would solve the issue.