xcmyz / FastSpeech

The Implementation of FastSpeech based on pytorch.
MIT License
858 stars 213 forks source link

error in new commit #81

Open Ahmad-noborders opened 4 years ago

Ahmad-noborders commented 4 years ago

hi @xcmyz after successful run of preprocess.py when i run train.py it gives following error

Use FastSpeech
Model Has Been Defined
Number of TTS Parameters: 25367169
Load data to buffer
100% 1132/1132 [32:11<00:00,  1.71s/it]
cost 1931.72s to load all data into buffer.
Defined Optimizer and Loss Function.

---Start New Training---

Traceback (most recent call last):
  File "train.py", line 193, in <module>
    main(args)
  File "train.py", line 106, in main
    length_target=duration)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 143, in forward
    return self.module(*inputs, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/fastspeech3/FastSpeech/model.py", line 42, in forward
    mel_max_length=mel_max_length)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/content/drive/My Drive/fastspeech3/FastSpeech/modules.py", line 82, in forward
    output = self.LR(x, target, mel_max_length=mel_max_length)
  File "/content/drive/My Drive/fastspeech3/FastSpeech/modules.py", line 72, in LR
    output = alignment @ x
RuntimeError: Expected tensor to have size 152 at dimension 1, but got size 91 for argument #2 'batch2' (while checking arguments for bmm)
Ahmad-noborders commented 4 years ago

if i run it on Gpu it gives same traceback with this error. in torch 1.2.0 : RuntimeError: invalid argument 6: wrong matrix size at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:499

in torch 1.5.0 last line of same error is RuntimeError: invalid argument 6: wrong matrix size at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:549

MorganCZY commented 4 years ago

Hi, an error occured to me when running preprocess.py with the latest code version. It seems the processing is jammed as shown in the following picture. Have you had this error? if yes, could you introduce your solutions? image

xcmyz commented 4 years ago

Hi, an error occured to me when running preprocess.py with the latest code version. It seems the processing is jammed as shown in the following picture. Have you had this error? if yes, could you introduce your solutions? image

futures.append(_process_utterance(out_dir, index, wav_path, text)) index = index + 1 return futures

MorganCZY commented 4 years ago

But what's the reason for this "deadlock" in the current code(with executor.submit....)?

MorganCZY commented 4 years ago

It seems because there are torch tensor operations in multi processing. I located that the code came to a deadlock when running the line as shown in the following picture. If I replace torch.FloatTensor with array, it passes. Could someone explain it? image

xcmyz commented 4 years ago

It seems because there are torch tensor operations in multi processing. I located that the code came to a deadlock when running the line as shown in the following picture. If I replace torch.FloatTensor with array, it passes. Could someone explain it? image

Because of the version of pytorch?

YinPing-Cho commented 4 years ago

hi @xcmyz, it seems this issue opened by @Ahmad-noborders is also reproduced here in my case. By printing the Tensors out, I find unresolved mismatches between the sizes of "duration" Tensors from the dataset and the "out" Tensors produced by DurationPredictor(). fastspeech

akashicMarga commented 4 years ago

@Ahmad-noborders were you able to resolve the issue?

Ahmad-noborders commented 4 years ago

@singhaki nope i had to move to tacotron2 which is base of this repo