babysor / MockingBird

🚀AI拟声: 5秒内克隆您的声音并生成任意语音内容 Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
35.36k stars 5.21k forks source link

替换模型训练遇到的问题 #477

Open 1135126802 opened 2 years ago

1135126802 commented 2 years ago

就是接着这个大佬的模型继续训练,因为我自己的模型太过于小了,无法收敛。但是一更换就报错 截图在下面 然后我再复制粘贴一下防止我没传上来图片

E:\数据集制作\MockingBird-main\synthesizer\synthesizer_dataset.py:84: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ..\torch\csrc\utils\tensor_new.cpp:201.) embeds = torch.tensor(embeds) C:\Users\11351\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\functional.py:1795: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead. warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.") Traceback (most recent call last): File "E:\数据集制作\MockingBird-main\synthesizer_train.py", line 37, in train(vars(args)) File "E:\数据集制作\MockingBird-main\synthesizer\train.py", line 208, in train optimizer.step() File "C:\Users\11351\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\optim\optimizer.py", line 88, in wrapper return func(*args, *kwargs) File "C:\Users\11351\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\autograd\grad_mode.py", line 28, in decorate_context return func(args, kwargs) File "C:\Users\11351\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\optim\adam.py", line 133, in step F.adam(params_with_grad, File "C:\Users\11351\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\optim_functional.py", line 86, in adam expavg.mul(beta1).add_(grad, alpha=1 - beta1) RuntimeError: The size of tensor a (1024) must match the size of tensor b (3) at non-singleton dimension 3 捕获1

1135126802 commented 2 years ago

走过路过的大佬求帮忙~

1135126802 commented 2 years ago

补充一下 我用的是这个大佬的数据集https://pan.baidu.com/s/1iONvRxmkI-t1nHqxKytY3g 百度盘链接 4j5d

1135126802 commented 2 years ago

社区的模型都试过了,除了谷歌DIrve的下不了之外。其他的都试过了,也是报错。 https://pan.baidu.com/s/1fMh9IlgKJlL2PIiRTYDUvw 百度盘链接 提取码:om7f 这个大佬的是这个代码 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]). 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]).

1135126802 commented 2 years ago

https://pan.baidu.com/s/1PI-hM3sn5wbeChRryX-RCQ 提取码:2021这个的是下面的 就是我的数据量要匹配这个模型才可以么 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]). 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]).

1239hy commented 2 years ago

同求大佬,一样问题

babysor commented 2 years ago

不是数据量问题,而是你的模型和代码版本不一致,你下载前要看模型是哪个代码版本,要切换过去(版本切换请学git)

1135126802 commented 2 years ago

好的 谢谢大佬 我去学一下gui

akiaki1996 commented 2 years ago

不是数据量问题,而是你的模型和代码版本不一致,你下载前要看模型是哪个代码版本,要切换过去(版本切换请学git)

我用的tag 0.01 的版本预处理然后换了模型(用的是ceshi)发现继续训练的时候会出现valueerror, 具体为: Loading weights at synthesizer\saved_models\chenlin\chenlin.pt Traceback (most recent call last): File "D:\Downloads\MockingBird-0.0.1\synthesizer_train.py", line 37, in train(**vars(args)) File "D:\Downloads\MockingBird-0.0.1\synthesizer\train.py", line 114, in train model.load(weights_fpath, optimizer) File "D:\Downloads\MockingBird-0.0.1\synthesizer\models\tacotron.py", line 526, in load optimizer.load_state_dict(checkpoint["optimizer_state"]) File "C:\Users\xxxxxxx\AppData\Loc File "D:\Downloads\MockingBird-0.0.1\synthesizer\train.py", line 114, in train model.load(weights_fpath, optimizer) File "D:\Downloads\MockingBird-0.0.1\synthesizer\models\tacotron.py", line 526, in load optimizer.load_state_dict(checkpoint["optimizer_state"]) File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\optim\optimizer.py", line 146, in load_state_dict raise ValueError("loaded state dict contains a parameter group " ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's groupal\Programs\Python\Python39\lib\site-packages\torch\optim\optimizer.py", line 146, in load_state_dict raise ValueError("loaded state dict contains a parameter group " ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group 请问下好心人怎么解决,第一次使用有些地方不太了解

hanc44 commented 1 year ago

好的 谢谢大佬 我去学一下gui

大佬学会了吗,小白求分享如何切换tag V0.0.1