Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: The size of tensor a (33) must match the size of tensor b (36) at non-singleton dimension 1 #17

Open
ltydd opened this issue Jul 24, 2023 · 1 comment

Comments

@ltydd
Copy link

ltydd commented Jul 24, 2023

Traceback (most recent call last): | 1/38 [00:01<01:06, 1.79s/it]
File "train.py", line 202, in
main(args, configs)
File "train.py", line 87, in main
output = model(*(batch[2:13]))
File "/home/LtyDD/.conda/envs/fastspeech2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/LtyDD/.conda/envs/fastspeech2/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 165, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/LtyDD/.conda/envs/fastspeech2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/LtyDD/Chinese-FastSpeech2/model/fastspeech2.py", line 65, in forward
output = self.encoder(texts, src_masks, char_vecs=char_vecs) ##############
File "/home/LtyDD/.conda/envs/fastspeech2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/LtyDD/Chinese-FastSpeech2/transformer/Models.py", line 95, in forward
enc_output += char_vecs
RuntimeError: The size of tensor a (33) must match the size of tensor b (36) at non-singleton dimension 1
请问有没有人在训练的过程中遇到这个错误?

@jin1258804025
Copy link

检查一些音素是否为支持的音素,dateset.py中有一个函数text_to_sequence,会将无效音素去除。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants