Multiple issues with the docker image, cuDNN, Failed in inference!: 'module' object has no attribute 'RNNCell'
Created by: paklau99988
Hi,
After running the docker file i tried:
/DeepSpeech/examples/aishell {develop} ./sh run_infer.sh
Which results in this error:
Traceback (most recent call last): File "infer.py", line 14, in <module> from model_utils.model import DeepSpeech2Model File "/DeepSpeech/model_utils/model.py", line 23, in <module> from model_utils.network import deep_speech_v2_network File "/DeepSpeech/model_utils/network.py", line 62, in <module> class RNNCell(fluid.layers.RNNCell): AttributeError: 'module' object has no attribute 'RNNCell' Failed in inference!
Then I found that I have to upgrade paddle inside the docker file which is strange. So i did:
``
wget https://nero-mirror.stanford.edu/pypi/web/packages/5f/b0/769cd78f5fdc9de41d760512750e70ace87caea54502882d0818e4b3ce1d/paddlepaddle_gpu-1.6.2.post107-cp27-cp27mu-manylinux1_x86_64.whl#sha256=e09b0ccf009c14984676ea535b94e5bc1b05e6ce3f80c332c464fcd1474a6067
pip install paddlepaddle_gpu-1.6.2.post107-cp27-cp27mu-manylinux1_x86_64.whl
After updating paddle to the recommended version:
Installing collected packages: paddlepaddle-gpu
Found existing installation: paddlepaddle-gpu 0.0.0
Uninstalling paddlepaddle-gpu-0.0.0:
Successfully uninstalled paddlepaddle-gpu-0.0.0
Successfully installed paddlepaddle-gpu-1.6.2.post107
``
I run sh infer.sh (aishell):
`` λ e535b121260f /DeepSpeech/examples/aishell {develop} sh run_infer.sh Download language model ... ./zh_giga.no_cna_cmn.prune01244.klm already exists, download skipped. grep: warning: GREP_OPTIONS is deprecated; please use an alias or script ----------- Configuration Arguments ----------- alpha: 2.6 beam_size: 300 beta: 5.0 cutoff_prob: 0.99 cutoff_top_n: 40 decoding_method: ctc_beam_search error_rate_type: cer infer_manifest: data/aishell/manifest.test lang_model_path: models/lm/zh_giga.no_cna_cmn.prune01244.klm mean_std_path: data/aishell/mean_std.npz model_path: checkpoints/aishell/step_final num_conv_layers: 2 num_proc_bsearch: 8 num_rnn_layers: 3 num_samples: 10 rnn_layer_size: 1024 share_rnn_weights: 0 specgram_type: linear use_gpu: 1 use_gru: 1 vocab_path: data/aishell/vocab.txt
2020-06-17 05:58:41,570-INFO: begin to initialize the external scorer for decoding 2020-06-17 05:58:41,657-INFO: language model: is_character_based = 1, max_order = 5, dict_size = 0 2020-06-17 05:58:41,657-INFO: end initializing scorer 2020-06-17 05:58:41,657-INFO: start inference ... W0617 05:58:43.268769 184 device_context.cc:236] Please NOTE: device: 0, CUDA Capability: 60, Driver API Version: 10.1, Runtime API Version: 10.0 W0617 05:58:43.272881 184 device_context.cc:244] device: 0, cuDNN Version: 7.5. W0617 05:58:43.272904 184 device_context.cc:270] WARNING: device: 0. The installed Paddle is compiled with CUDNN 7.6, but CUDNN version in your machine is 7.5, which may cause serious incompatible bug. Please recompile or reinstall Paddle with compatible CUDNN version. checkpoints/aishell/step_final Traceback (most recent call last): File "infer.py", line 152, in main() File "infer.py", line 148, in main infer() File "infer.py", line 124, in infer feeding_dict=data_generator.feeding) File "/DeepSpeech/model_utils/model.py", line 411, in infer_batch_probs self.init_from_pretrained_model(exe, infer_program) File "/DeepSpeech/model_utils/model.py", line 155, in init_from_pretrained_model raise Warning("The pretrained params do not exist.") Warning: The pretrained params do not exist. Failed in inference! ``
I do not understand, the docker is not working with the paddle version + cuDNN version that you recommended or is this another error?
Thanks!