profile
viewpoint

Ask questionsValueError: empty range for randrange() (0,-8, -8)

Error when I try to train vocoder with custom dataset.

 > Using CUDA:  True
 > Number of GPUs:  1
fatal: not a git repository (or any of the parent directories): .git
 > Git Hash: 0000000
 > Experiment folder: vocoder_model/multiband-melgan-Kasım-26-2020_01+29ÖS-0000000
fatal: not a git repository (or any of the parent directories): .git
 > Loading wavs from: LJSpeech-1.1/wavs/
 > Setting up Audio Processor...
 | > sample_rate:22050
 | > num_mels:80
 | > min_level_db:-100
 | > frame_shift_ms:None
 | > frame_length_ms:None
 | > ref_level_db:0
 | > fft_size:1024
 | > power:None
 | > preemphasis:0.0
 | > griffin_lim_iters:None
 | > signal_norm:True
 | > symmetric_norm:True
 | > mel_fmin:50.0
 | > mel_fmax:7600.0
 | > spec_gain:1.0
 | > stft_pad_mode:reflect
 | > max_norm:4.0
 | > clip_norm:True
 | > do_trim_silence:True
 | > trim_db:60
 | > do_sound_norm:False
 | > stats_path:scale_stats.npy
 | > hop_length:256
 | > win_length:1024
 > Generator Model: multiband_melgan_generator
 > Discriminator Model: melgan_multiscale_discriminator
 > Generator has 2539448 parameters
 > Discriminator has 4354998 parameters

 > EPOCH: 0/10000

 > TRAINING (2020-11-26 13:29:50) 
 ! Run is removed from vocoder_model/multiband-melgan-Kasım-26-2020_01+29ÖS-0000000
Traceback (most recent call last):
  File "TTS/vocoder/train.py", line 648, in <module>
    main(args)
  File "TTS/vocoder/train.py", line 552, in main
    epoch)
  File "TTS/vocoder/train.py", line 101, in train
    for num_iter, data in enumerate(data_loader):
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 363, in __next__
    data = self._next_data()
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 971, in _next_data
    return self._process_data(data)
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
    data.reraise()
  File "/usr/local/lib/python3.6/dist-packages/torch/_utils.py", line 395, in reraise
    raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 2.
Original Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop
    data = fetcher.fetch(index)
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.6/dist-packages/TTS-0.0.3+b1935c9-py3.6.egg/TTS/vocoder/datasets/gan_dataset.py", line 70, in __getitem__
    item1 = self.load_item(idx)
  File "/usr/local/lib/python3.6/dist-packages/TTS-0.0.3+b1935c9-py3.6.egg/TTS/vocoder/datasets/gan_dataset.py", line 116, in load_item
    mel_start = random.randint(0, max_mel_start)
  File "/usr/lib/python3.6/random.py", line 221, in randint
    return self.randrange(a, b+1)
  File "/usr/lib/python3.6/random.py", line 199, in randrange
    raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0,-8, -8)

How to fix it?

mozilla/TTS

Answer questions erogol

probably.

I close this issue as you fixed it.

useful!
source:https://uonfu.com/
Github User Rank List