Closed smitesh-sutaria closed 3 years ago
@smitesh-sutaria the error message "No node with name previous_state_h/read" speak that model does not contain layer with this name. This stale PR was not accepted to OMZ, why do you decide that it contains actual info? (especially, if take in account that at the moment of its creation, deepspeech0.6.1 has not been released at all :)
please try the following command for converting model:
python ./mo_tf.py --model_name "deepspeech_0.6.1" \
--output_dir <output_ir_dir> \
--input_model <path_to_tf_model>/output_graph.pb \
--freeze_placeholder_with_value "input_lengths->[16]" \
--input "input_node,previous_state_h,previous_state_c" \
--input_shape "[1,16,19,26],[1,2048],[1,2048]" \
--output "logits,cudnn_lstm/rnn/multi_rnn_cell/cell_0/cudnn_compatible_lstm_cell/GatherNd,cudnn_lstm/rnn/multi_rnn_cell/cell_0/cudnn_compatible_lstm_cell/GatherNd_1" \
--disable_nhwc_to_nchw \
--log_level WARNING
P.S. I also need to warn you, if you want try demo from this PR on deepspeech0.6.1, it is also may be not suitable.
@eaidova Thank you for the inputs. The command you gave worked for converting the model but as you rightly pointed out, the demo might not work. Understand that v0.6.1 is not backward compatible with v0.5.1. The rationale behind usage of newer versions of deepspeech is to get better performance. Which version of deepspeech is officially supported ? What are the future roadmap in terms of supporting latest version of deepspeech ?
While using the 0.6.1 model with PR demo, below is the error i get : (mismatch with input , output layers)
python3 deepspeech_openvino_0.5.py -m /opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/output_graph.xml -i audio/2830-3980-0043.wav -a alphabet_b.txt
[ INFO ] Creating Inference Engine
[ INFO ] Loading network files:
/opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/output_graph.xml
/opt/intel/openvino_2020.3.194/deployment_tools/model_optimizer/output_graph.bin
deepspeech_openvino_0.5.py:124: DeprecationWarning: Reading network using constructor is deprecated. Please, use IECore.read_network() method instead
net = IENetwork(model=model_xml, weights=model_bin)
[ INFO ] Preparing input blobs
[ INFO ] Preparing output blobs
[ INFO ] Loading model to the plugin
Traceback (most recent call last):
File "deepspeech_openvino_0.5.py", line 185, in
@FengYen-Chang : Your Inputs/Feedback please.
@smitesh-sutaria, deepspeech model have some troubles with license, it stopped us to publish it as part OMZ, but we working on it... In the optimistic scenario, the updated demo can become a part of OMZ in the next release. I can say that deepspeech0.6.1 actually supported by openvino and successfully pass accuracy validation via accuracy checker, so the observed issue connected only with incompatibilities in John Feng's code. this error similar with what you sow during model conversion and connected with inputs renaming, please try to replace constants for input names with new:
@eaidova Thank you for the inputs. Will try it out and keep you posted. WER (word error rate) of the latest release 0.7.4 is 5.97%, while that of 0.6.1 is 7.5%. Any specific reason to go for 0.6.1 and not for the latest release 0.7.4? Are there plans/road-map to support 0.7.4 ?
Thanks @eaidova.
@smitesh-sutaria , really sorry for the late reply, I have updated the demo to version,0.6.1
. Please check that repo. Thanks.
For the version 0.7.4
, you can use the same MO command which you convert the version 0.6.1
to convert the .pb
file and then patch the parameter upper_frequency_limit_
which under function mfcc_mel_filiterbank_init
from 4000
to 8000
.
After this patch, the demo should be run well.
@smitesh-sutaria do you have an additional questions on this?
This model has now been added to OMZ, so this should no longer be relevant. Closing.
Using https://github.com/FengYen-Chang/open_model_zoo/tree/master/demos/python_demos/deep_speech_demo able to convert deepspeech-0.5.1 model.
But when attempt it on 0.6.1 version, get the below error :