yeyupiaoling / PaddlePaddle-DeepSpeech

基于PaddlePaddle实现的语音识别,中文语音识别。项目完善,识别效果好。支持Windows,Linux下训练和预测,支持Nvidia Jetson开发板预测。
https://yeyupiaoling.blog.csdn.net/article/details/102904306
Apache License 2.0
667 stars 145 forks source link

3070的卡 可以正常训练,但预测遇到以下问题 #39

Closed 0we closed 3 years ago

0we commented 3 years ago

由于30系列只支持CUDA-11.0以上,我换掉了CUDA-10.0和cudnn7.3到cuda11.3和cudnn8.2 paddlepaddle也换到2.1.0的版本 models.py 加入 import paddle paddle.enable.static()

python3 train.py 正常训练,正常保存模型

但是 infer_path.py 加入了 import paddle paddle.enable.static() 会出现以下错误:

python3 infer_path.py --model_path=./models/epoch_0/ --wav_path=./dataset/test.wav

grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.7/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
W0520 03:02:36.909706 16902 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.3, Runtime API Version: 11.2
W0520 03:02:36.911597 16902 device_context.cc:422] device: 0, cuDNN Version: 8.2
> 成功加载了预训练模型:./models/epoch_0/
[INFO 2021-05-20 03:02:40,163 model.py:524] begin to initialize the external scorer for decoding
terminate called after throwing an instance of 'lm::FormatLoadException'
  what():  kenlm/lm/vocab.cc:43 in void lm::ngram::{anonymous}::ReadWords(int, lm::EnumerateVocab*, lm::WordIndex, uint64_t) threw FormatLoadException because `memcmp(check_unk, "<unk>", 6)'.
Vocabulary words are in the wrong place.  This could be because the binary file was built with stale gcc and old kenlm.  Stale gcc, including the gcc distributed with RedHat and OS X, has a bug that ignores pragma pack for template-dependent types.  New kenlm works around this, so you'll save memory but have to rebuild any binary files using the probing data structure.

--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
0   Scorer::Scorer(double, double, std::string const&, std::vector<std::string, std::allocator<std::string > > const&)
1   Scorer::setup(std::string const&, std::vector<std::string, std::allocator<std::string > > const&)
2   Scorer::load_lm(std::string const&)
3   lm::ngram::LoadVirtual(char const*, lm::ngram::Config const&, lm::ngram::ModelType)
4   lm::ngram::detail::GenericModel<lm::ngram::detail::HashedSearch<lm::ngram::BackoffValue>, lm::ngram::ProbingVocabulary>::GenericModel(char const*, lm::ngram::Config const&)
5   lm::ngram::ProbingVocabulary::LoadedBinary(bool, int, lm::EnumerateVocab*, unsigned long)
6   paddle::framework::SignalHandle(char const*, int)
7   paddle::platform::GetCurrentTraceBackString[abi:cxx11]()

----------------------
Error Message Summary:
----------------------
FatalError: `Process abort signal` is detected by the operating system.
  [TimeInfo: *** Aborted at 1621479760 (unix time) try "date -d @1621479760" if you are using GNU date ***]
  [SignalInfo: *** SIGABRT (@0x4206) received by PID 16902 (TID 0x7f254b481700) from PID 16902 ***]
yeyupiaoling commented 3 years ago

@0we 这个是解码的时候出现了问题,你是用小的语言模型吗?2.多G那个?

0we commented 3 years ago

@ 0we这个是解码的时候出现了问题,你是用小的语言模型吗?2。多G那个?

是的,我之前2060的卡这个模型文件正常加载

yeyupiaoling commented 3 years ago

@0we 重新编译一下解码器