运行infer.py时报错: ValueError: No such parameter ___conv_0__.w0
Created by: jayxioresearch
运行infer.py时报错,不知道是否与自制的语言模型有关。从输出中看,好像语言模型已经被成功读入了,谢谢。 python infer.py --use_gpu False --trainer_count 1 ----------- Configuration Arguments ----------- alpha: 2.5 beam_size: 500 beta: 0.3 cutoff_prob: 1.0 cutoff_top_n: 40 decoding_method: ctc_beam_search error_rate_type: wer infer_manifest: /home/xio/Baidu/BDeepSpeech2/amol.manifest lang_model_path: /home/xio/Baidu/BDeepSpeech2/speech_model/lm3.binary mean_std_path: /home/xio/Baidu/BDeepSpeech2/speech_model/mean_std.npz model_path: /home/xio/Baidu/BDeepSpeech2/speech_model/baidu_en8k_model.tar.gz num_conv_layers: 2 num_proc_bsearch: 8 num_rnn_layers: 3 num_samples: 1 rnn_layer_size: 2048 share_rnn_weights: True specgram_type: linear trainer_count: 1 use_gpu: 0 use_gru: False vocab_path: /home/xio/Baidu/BDeepSpeech2/speech_model/vocab.txt
I1029 20:57:05.445317 6422 Util.cpp:166] commandline: --use_gpu=0 --rnn_use_batch=True --trainer_count=1 [INFO 2018-10-29 20:57:05,494 layers.py:2716] output for conv_0: c = 32, h = 81, w = 54, size = 139968 [INFO 2018-10-29 20:57:05,495 layers.py:3361] output for batch_norm_0: c = 32, h = 81, w = 54, size = 139968 [INFO 2018-10-29 20:57:05,495 layers.py:7533] output for scale_sub_region_0: c = 32, h = 81, w = 54, size = 139968 [INFO 2018-10-29 20:57:05,496 layers.py:2716] output for conv_1: c = 32, h = 41, w = 54, size = 70848 [INFO 2018-10-29 20:57:05,497 layers.py:3361] output for batch_norm_1: c = 32, h = 41, w = 54, size = 70848 [INFO 2018-10-29 20:57:05,497 layers.py:7533] output for scale_sub_region_1: c = 32, h = 41, w = 54, size = 70848 [INFO 2018-10-29 20:57:06,238 model.py:243] begin to initialize the external scorer for decoding [INFO 2018-10-29 20:57:06,571 model.py:253] language model: is_character_based = 0, max_order = 5, dict_size = 23264 [INFO 2018-10-29 20:57:06,571 model.py:254] end initializing scorer [INFO 2018-10-29 20:57:06,571 infer_jay.py:103] start inference ... Traceback (most recent call last): File "infer_jay.py", line 135, in main() File "infer_jay.py", line 131, in main infer() File "infer_jay.py", line 105, in infer feeding_dict=data_generator.feeding) File "/home/xio/Baidu/BDeepSpeech2/DeepSpeech/model_utils/model.py", line 193, in infer_batch_probs output_layer=self._log_probs, parameters=self._parameters) File "/home/xio/venv/py27/local/lib/python2.7/site-packages/paddle/v2/inference.py", line 64, in init val.copyFromNumpyArray(parameters.get(name).flatten()) File "/home/xio/venv/py27/local/lib/python2.7/site-packages/paddle/v2/parameters.py", line 242, in get return self.getitem(key=parameter_name) File "/home/xio/venv/py27/local/lib/python2.7/site-packages/paddle/v2/parameters.py", line 186, in getitem return self.__getter_inner(key, api.PARAMETER_VALUE) File "/home/xio/venv/py27/local/lib/python2.7/site-packages/paddle/v2/parameters.py", line 153, in __getter_inner shape = self.get_shape(key) File "/home/xio/venv/py27/local/lib/python2.7/site-packages/paddle/v2/parameters.py", line 200, in get_shape raise ValueError("No such parameter %s" % key) ValueError: No such parameter _conv_0.w0