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

Model shape mismatch #948

Closed
firstprayer opened this issue Aug 19, 2023 · 1 comment
Closed

Model shape mismatch #948

firstprayer opened this issue Aug 19, 2023 · 1 comment

Comments

@firstprayer
Copy link

Summary[问题简述(一句话)]
用Pretrain模型(https://yisiou-my.sharepoint.com/:u:/g/personal/lawrence_cheng_fawenyo_onmicrosoft_com/EWFWDHzee-NNg9TWdKckCc4BC7bK2j9cCbOWn0-_tK0nOg?e=n0gGgC),加载模型的时候出现shape mismatch

Env & To Reproduce[复现与环境]
模型链接如上
在Mac M1 Pro,环境Python3.9

Screenshots[截图(如有)]

RuntimeError: Error(s) in loading state_dict for Tacotron:
	size mismatch for encoder_proj.weight: copying a param with shape torch.Size([128, 512]) from checkpoint, the shape in current model is torch.Size([128, 1024]).
	size mismatch for decoder.attn_rnn.weight_ih: copying a param with shape torch.Size([384, 768]) from checkpoint, the shape in current model is torch.Size([384, 1280]).
	size mismatch for decoder.rnn_input.weight: copying a param with shape torch.Size([1024, 640]) from checkpoint, the shape in current model is torch.Size([1024, 1152]).
	size mismatch for decoder.stop_proj.weight: copying a param with shape torch.Size([1, 1536]) from checkpoint, the shape in current model is torch.Size([1, 2048]).

这已经是按照#37 修复过一轮了,否则还要再多一个类似的error。

@firstprayer
Copy link
Author

Resolved after using the latest retrained model

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

1 participant