PaddleSpeech icon indicating copy to clipboard operation
PaddleSpeech copied to clipboard

[S2T] 转静态模型遇到错误:AttributeError: checkpoint

Open great-wind opened this issue 1 year ago • 2 comments

根据examples/wenetspeech/asr1/README.md说明,对asr1_chunk_conformer_u2pp_wenetspeech_ckpt_1.3.0.model.tar.gz中的模型进行转化。

步骤如下: 1.进入转化脚本所在目录:cd examples/wenetspeech/asr1/ 2.解压下载的模型文件压缩包至当前目录。 3.运行转化脚本:./local/export.sh asr1_chunk_conformer_u2pp_wenetspeech_ckpt_1.3.0.model/model.yaml asr1_chunk_conformer_u2pp_wenetspeech_ckpt_1.3.0.model/exp/chunk_conformer_u2pp/checkpoints/avg_10 ./export.ji

报错如下:

Traceback (most recent call last):
  File "/home/PaddleSpeech-r1.4/paddlespeech/s2t/exps/u2/bin//export.py", line 53, in <module>
    main(config, args)
  File "/home/PaddleSpeech-r1.4/paddlespeech/s2t/exps/u2/bin//export.py", line 30, in main
    main_sp(config, args)
  File "/home/PaddleSpeech-r1.4/paddlespeech/s2t/exps/u2/bin//export.py", line 23, in main_sp
    exp = Tester(config, args)
  File "/home/root/anaconda3/envs/speech_test/lib/python3.7/site-packages/paddlespeech/s2t/exps/u2/model.py", line 313, in __init__
    super().__init__(config, args)
  File "/home/root/anaconda3/envs/speech_test/lib/python3.7/site-packages/paddlespeech/s2t/exps/u2/model.py", line 48, in __init__
    super().__init__(config, args)
  File "/home/root/anaconda3/envs/speech_test/lib/python3.7/site-packages/paddlespeech/s2t/training/trainer.py", line 130, in __init__
    kbest_n=self.config.checkpoint.kbest_n,
  File "/home/root/anaconda3/envs/speech_test/lib/python3.7/site-packages/yacs/config.py", line 141, in __getattr__
    raise AttributeError(name)
AttributeError: checkpoint
2024-01-19 17:44:08.242 | INFO     | paddlespeech.s2t.training.trainer:__init__:116 - Rank: 0/1
Failed in export!

great-wind avatar Jan 19 '24 10:01 great-wind

看着像是版本问题,现在的环境可以正常训练推理吗?

zxcd avatar Jan 23 '24 11:01 zxcd

看着像是版本问题,现在的环境可以正常训练推理吗?

没有做训练,可以正常推理,使用的环境:

  • CentOS7
  • paddlepaddle-gpu 2.4.2.post112
  • paddlespeech使用的是分支(branches)r1.4

great-wind avatar Jan 24 '24 01:01 great-wind