执行命令
python synthesizer_train.py mandarin {自己的路径}\SV2TTS\synthesizer
当
_characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!'(),-.:;? '
报错
File "synthesizer_train.py", line 37, in
train(**vars(args))
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\train.py", line 122, in train
model.load(weights_fpath, device, optimizer)
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\models\tacotron.py", line 548, in load
self.load_state_dict(checkpoint["model_state"], strict=False)
File "D:\Anaconda3\envs\MB\lib\site-packages\torch\nn\modules\module.py", line 1497, 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([70, 512]) from checkpoint, the shape in current model is torch.Size([75, 512]).
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]).
当
_characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!'(),-.:;? '
报错
File "synthesizer_train.py", line 37, in
train(**vars(args))
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\train.py", line 122, in train
model.load(weights_fpath, device, optimizer)
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\models\tacotron.py", line 548, in load
self.load_state_dict(checkpoint["model_state"], strict=False)
File "D:\Anaconda3\envs\MB\lib\site-packages\torch\nn\modules\module.py", line 1497, 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_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]).
改
use_gst = False, 和 use_ser_for_gst = False,
报错
File "synthesizer_train.py", line 37, in
train(**vars(args))
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\train.py", line 122, in train
model.load(weights_fpath, device, optimizer)
File "D:\ai\MockingBird-main\MockingBird-main\synthesizer\models\tacotron.py", line 548, in load
self.load_state_dict(checkpoint["model_state"], strict=False)
File "D:\Anaconda3\envs\MB\lib\site-packages\torch\nn\modules\module.py", line 1497, 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_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]).
1条答案
按热度按时间l7wslrjt1#
切换到tag0.0.1试试