Closed Ficery1 closed 3 years ago
看来应该是 deep voice 3 的 train代码中用的 waveflow 是 residual channel = 128 的。你目前训练的 是 residual channel 为 64 的。
因为它在加载参数的时候出了问题。
WaveflowVocoder 的初始化方式是通过一个配置文件构建模型,然后加载训练好的参数。这个要对应才能正确加载参数。可以查看 examples/deepvoice3/vocoder.py
看来应该是deep voice 3的trains中用的waveflow是剩余频道= 128的。你目前训练的是剩余频道为64的。
因为它在加载参数的时候出了问题。
WaveflowVocoder的初始化方式是通过一个配置文件构建模型,然后加载训练好的参数。这个要对应的能力正确加载参数。可以查看
examples/deepvoice3/vocoder.py
谢谢。找到了问题。项目中wavefolw的配置文件中n_channels默认是64。我在使用deepvoice3时 是下载的预训练好的参数和配置文件,该配置文件中n_channels默认是128.
Traceback (most recent call last): File "E:/AI/Parakeet/examples/deepvoice3/train.py", line 187, in
train(args, config)
File "E:/AI/Parakeet/examples/deepvoice3/train.py", line 137, in train
vocoder = WaveflowVocoder()
File "E:\AI\Parakeet\examples\deepvoice3\vocoder.py", line 24, in init
load_parameters(self.model, checkpoint_path=checkpoint_path)
File "E:\AI\Parakeet\parakeet\utils\io.py", line 135, in load_parameters
model.set_dict(model_dict)
File "E:\setup\anaconda\envs\Parakeet\lib\site-packages\paddle\fluid\dygraph\layers.py", line 665, in set_dict
use_structured_name=use_structured_name)
File "E:\setup\anaconda\envs\Parakeet\lib\site-packages\paddle\fluid\dygraph\layers.py", line 705, in load_dict
para.set_value(stat_dict[key_name])
File "", line 2, in set_value
File "E:\setup\anaconda\envs\Parakeet\lib\site-packages\paddle\fluid\wrapped_decorator.py", line 25, in impl
return wrapped_func(*args, *kwargs)
File "E:\setup\anaconda\envs\Parakeet\lib\site-packages\paddle\fluid\framework.py", line 216, in impl
return func(args, **kwargs)
File "E:\setup\anaconda\envs\Parakeet\lib\site-packages\paddle\fluid\dygraph\varbase_patch_methods.py", line 66, in set_value
self.name, self_tensor_np.shape, value_np.shape)
AssertionError: Variable Shape not match, Variable [ weight_norm_wrapper_2.w_0 ] need tensor with shape (128, 1, 1, 1) but load set tensor with shape (64, 1, 1, 1)
W0728 16:56:40.347012 11192 device_context.cc:252] Please NOTE: device: 0, CUDA Capability: 52, Driver API Version: 10.1, Runtime API Version: 10.0
W0728 16:56:40.487767 11192 device_context.cc:260] device: 0, cuDNN Version: 7.6.