Create Model failed after transfer learning

I have re-trained on top of deepspeech-0.6.1-checkpoint. It went well and converted .pb file to .pbmm file. When trying to use this model for prediction its showing error.But the model given by the deepspeech is working fine. Not able to figure out why?
please Help, thanks in advance.

deepspeech --v =>
TensorFlow: v1.14.0-21-ge77504a
DeepSpeech: v0.6.1-0-g3df20fe

cmd:
deepspeech --model …/mirrorFitModelv1.0/output_graph.pbmm --lm deepspeech-0.6.1-models/lm.binary --trie deepspeech-0.6.1-models/trie --audio audio/2830-3980-0043.wav

console logs:
Loading model from file …/mirrorFitModelv1.0/output_graph.pbmm
TensorFlow: v1.14.0-21-ge77504a
DeepSpeech: v0.6.1-0-g3df20fe
2020-01-20 16:08:37.148672: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Unable to fetch graph version: Invalid argument: Session was not created with a graph before Run()!
Traceback (most recent call last):
File “/root/tmp/deepspeech-mark1-venv/bin/deepspeech”, line 8, in
sys.exit(main())
File “/root/tmp/deepspeech-mark1-venv/lib/python3.6/site-packages/deepspeech/client.py”, line 113, in main
ds = Model(args.model, args.beam_width)
File “/root/tmp/deepspeech-mark1-venv/lib/python3.6/site-packages/deepspeech/init.py”, line 42, in init
raise RuntimeError(“CreateModel failed with error code {}”.format(status))
RuntimeError: CreateModel failed with error code 8195

Your model is incorrect and we can’t read Metadata.

You need to share more details on how you export and convert.

for generating graph.pb =>
python3 DeepSpeech.py --n_hidden 2048 --checkpoint_dir /mark1/DeepSpeech/deepspeech-0.6.1-checkpoint/ --cudnn_checkpoint ./deepspeech-0.6.1-checkpoint --epochs 3 --train_files /mark1/DeepSpeech/myDataset/train.csv --learning_rate 0.0001 --export_dir /mark1/mirrorFitModelv1.0/

for generating graph.pbmm from .pb=>
chmod +x convert_graphdef_memmapped_format
./convert_graphdef_memmapped_format --in_graph=output_graph.pb --out_graph=output_graph.pbmm

These were the commands i used?

Can you make sure this is fresh r1.14 convert_graphdef_memmapped_format ?

Does the code works with the .pb model file or you have the same error ?

Can you ensure this is done on a v0.6.1 git checkout ?

Thanks lissyx, seems like version issue with convert_graphdef_memmapped_format (I have used it from one of your posts, may be thats why). Its working with .pb file. Can you please tell me from where i can download the latest one. any link will suffice. Thanks in advance.

Please check the documentation: https://deepspeech.readthedocs.io/en/v0.6.1/TRAINING.html#making-a-mmap-able-model-for-inference

Thanks alot for helping out so fast. One last tip if you can give how many voice clips should i need to train this model to work properly for indian accent. generally for our use case input will be maximum 5 sec.

Please search the forum for other English Indian efforts, we have replied to that hundreds of times.

1 Like