PaddlePaddle / PaddleSpeech

Easy-to-use Speech Toolkit including Self-Supervised Learning model, SOTA/Streaming ASR with punctuation, Streaming TTS with text frontend, Speaker Verification System, End-to-End Speech Translation and Keyword Spotting. Won NAACL2022 Best Demo Award.
https://paddlespeech.readthedocs.io
Apache License 2.0
11.22k stars 1.86k forks source link

train.py运行完以后报错ValueError: The ``path`` (./exp/default/checkpoints/snapshot_iter_96699.pdz) to load model not exists. #3237

Open hhuyzp opened 1 year ago

hhuyzp commented 1 year ago

General Question

我在微调完模型以后,遇到了以下问题:

[2023-05-10 11:33:56,137] [    INFO] - Already cached /home/user/.paddlenlp/models/bert-base-chinese/bert-base-chinese-vocab.txt [2023-05-10 11:33:56,146] [    INFO] - tokenizer config file saved in /home/user/.paddlenlp/models/bert-base-chinese/tokenizer_config.json [2023-05-10 11:33:56,146] [    INFO] - Special tokens file saved in /home/user/.paddlenlp/models/bert-base-chinese/special_tokens_map.json frontend done! W0510 11:33:56.385061 15086 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 6.1, Driver API Version: 11.6, Runtime API Version: 11.6 W0510 11:33:56.388725 15086 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4. Traceback (most recent call last):   File "/home/user/PaddleSpeech/paddlespeech/t2s/exps/fastspeech2/../synthesize_e2e.py", line 317, in <module>     main()   File "/home/user/PaddleSpeech/paddlespeech/t2s/exps/fastspeech2/../synthesize_e2e.py", line 313, in main     evaluate(args)   File "/home/user/PaddleSpeech/paddlespeech/t2s/exps/fastspeech2/../synthesize_e2e.py", line 60, in evaluate     am_inference = get_am_inference(   File "/home/user/PaddleSpeech/paddlespeech/t2s/exps/syn_utils.py", line 423, in get_am_inference     am.set_state_dict(paddle.load(am_ckpt)["main_params"])   File "/home/user/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/framework/io.py", line 1103, in load     load_result = _legacy_load(path, **configs)   File "/home/user/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/framework/io.py", line 1124, in _legacy_load     model_path, config = _build_load_path_and_config(path, config)   File "/home/user/miniconda3/envs/paddle/lib/python3.9/site-packages/paddle/framework/io.py", line 200, in _build_load_path_and_config     raise ValueError(error_msg % path) ValueError: The path (./exp/default/checkpoints/snapshot_iter_96699.pdz) to load model not exists.

在最后一行的ValueError提示的path下,我找到了几个.pdz文件 /home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/records.jsonl文件里面的内容如下: {"time": "2023-05-10 13:07:41.197976", "path": "/home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/snapshot_iter_97360.pdz", "iteration": 97360} {"time": "2023-05-10 13:07:45.542799", "path": "/home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/snapshot_iter_97370.pdz", "iteration": 97370} {"time": "2023-05-10 13:07:49.903181", "path": "/home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/snapshot_iter_97380.pdz", "iteration": 97380} {"time": "2023-05-10 13:07:54.426551", "path": "/home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/snapshot_iter_97390.pdz", "iteration": 97390} {"time": "2023-05-10 13:07:58.875535", "path": "/home/user/PaddleSpeech/examples/other/tts_finetune/tts3/exp/default/checkpoints/snapshot_iter_97400.pdz", "iteration": 97400}

有没有大佬可以帮忙指点一下

zxcd commented 1 year ago

在训练之前你需要下载一些准备数据,具体可以参考一下examples/other/tts_finetune/tts3/README.md

wytyl13 commented 6 months ago

同问题,请问有答案吗

wytyl13 commented 6 months ago

同问题,请问有答案吗

应该是没有下载官网提供的合成的数据。。。调整下阶段 0-5可以进行到微调,不进行合成 ./run.sh --stage 0 --stop-stage 5

wytyl13 commented 6 months ago

同问题,请问有答案吗

应该是没有下载官网提供的合成的数据。。。调整下阶段 0-5可以进行到微调,不进行合成 ./run.sh --stage 0 --stop-stage 5

需要合成的话,也就是继续调用run脚本中后续的合成脚本,打开run.sh文件可以发现ckpt=snapshot_iter_96699这个变量是写死的,因此更改或者写个动态定义的脚本就行了