babysor / babysor/MockingBird

替换了别人的模型继续训练后发现报错,这是哪里出现问题了吗?有大佬可以帮忙解读一下吗?谢谢了

Open
#756 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

Loading weights at synthesizer\saved_models\chara\chara.pt
Traceback (most recent call last):
File "I:\voice\audio\MockingBird-main\synthesizer_train.py", line 37, in
train(**vars(args))
File "I:\voice\audio\MockingBird-main\synthesizer\train.py", line 121, in train
model.load(weights_fpath, device, optimizer)
File "I:\voice\audio\MockingBird-main\synthesizer\models\base.py", line 51, in load
self.load_state_dict(checkpoint["model_state"], strict=False)
File "C:\Users\胡一潇\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Tacotron:
size mismatch for encoder.embedding.weight: copying a param with shape torch.Size([149, 512]) from checkpoint, the shape in current model is torch.Size([169, 512]).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with synthesizer_train.py and follow the call into synthesizer/train.py, then inspect the load path in synthesizer/models/base.py. Compare the checkpoint's encoder.embedding.weight shape with the current Tacotron model configuration and run the training command using the mentioned chara.pt file. Done means the compatibility issue is explained and the model either loads successfully or reports a clearly actionable error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.