m-toman / tacorn

2018/2019 TTS framework integrating state of the art open source methods
MIT License
47 stars 4 forks source link

[ERROR] invalid argument 0: Sizes of tensors must match except in dimension 2. #2

Closed h-meru closed 6 years ago

h-meru commented 6 years ago

Hi, @m-toman After forking from your repository and improving it a bit, I tried running the program but in the following part I get an error by all means.

https://github.com/h-meru/Tacotron-WaveRNN/blob/master/wavernn/model.py#L117

Traceback (most recent call last):
  File "train.py", line 119, in <module>
    main()
  File "train.py", line 111, in main
    wavernn_train(args, log_dir, hparams)
  File "Tacotron-WaveRNN/wavernn/train.py", line 170, in wavernn_train
    train(args, log_dir, input_dir, hparams)
  File "Tacotron-WaveRNN/wavernn/train.py", line 136, in train
    y_hat = model(x, m)
  File "/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "Tacotron-WaveRNN/wavernn/model.py", line 117, in forward
    x = torch.cat([x.unsqueeze(-1), mels, a1], dim=2)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 2. Got 1375 and 1500 in dimension 1 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:87

Please let me know how to do it without executing inverse quantization to 9 bits but keeping it at 16 bit.

h-meru commented 6 years ago

my code is "hop_length = 300". correct is "hop_length = 275"...

This is my mistake.

m-toman commented 6 years ago

Does it work for you with 16 bit? I wonder if we should integrate the original model from https://github.com/fatchord/WaveRNN/blob/master/models/wavernn.py in addition to the alternative model

h-meru commented 6 years ago

@m-toman I have not tested it with 16 bit yet. For the time being, I was able to get rid of the bug with 9bit!

Yeah. I also noticed the other day, but I have not been working on that model yet. If it is an implementation closer to the original RNN, it will be necessary to integrate it. But before that I will judge after waiting for him to release the samples from that model.