Error loading Pretrained model

Hi,

I’m trying to use run the pretrained model in linux (via WML ubuntu).
I keep running into the same error message, despite several alternations:

root@SBLaptop:~/DeepSpeech/DeepSpeech# deepspeech --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio/2830-3980-0043.wav

Loading model from file models/output_graph.pbmm

TensorFlow: v1.11.0-9-g97d851f

DeepSpeech: v0.3.0-0-gef6b5bd

Not found: Op type not registered ‘Assert’ in binary running on SBLaptop. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.

Traceback (most recent call last):
File “/usr/local/bin/deepspeech”, line 11, in
sys.exit(main())
File “/usr/local/lib/python3.6/dist-packages/deepspeech/client.py”, line 81, in main
ds = Model(args.model, N_FEATURES, N_CONTEXT, args.alphabet, BEAM_WIDTH)
File “/usr/local/lib/python3.6/dist-packages/deepspeech/init.py”, line 14, in init
raise RuntimeError(“CreateModel failed with error code {}”.format(status))
RuntimeError: CreateModel failed with error code 5

Below is my shell script:

#!/bin/bash

sudo apt-get -y update

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh

sudo apt-get -y install git-lfs

sudo apt-get -y install python3.6

sudo apt-get -y install python3-pip

git clone https://github.com/mozilla/DeepSpeech

cd DeepSpeech

python3 util/taskcluster.py --target

wget https://github.com/mozilla/DeepSpeech/releases/download/v0.1.0/audio-0.1.0.tar.gz

tar -xvzf audio-0.1.0.tar.gz

wget https://github.com/mozilla/DeepSpeech/releases/download/v0.1.0/deepspeech-0.1.0-models.tar.gz

tar -xvzf deepspeech-0.1.0-models.tar.gz

pip3 install deepspeech

pip3 install -r requirements.txt

chmod u+x util/taskcluster.py

util/taskcluster.py --target models/ --artifact convert_graphdef_memmapped_format --source tensorflow

chmod u+x models/convert_graphdef_memmapped_format

models/convert_graphdef_memmapped_format --in_graph=models/output_graph.pb --out_graph=models/output_graph.pbmm

deepspeech --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie --audio audio/2830-3980-0043.wav

I’m virtually a complete beginner with linux so any help or advice is much appreciated!

@Swan i think you need to create different virtual environments for training and running inference.

you will create new virtual environment then install deepspeech . like this

virtualenv -p python3.6 ~/tmp/ds-test/

source ~/tmp/ds-test/bin/activate

pip3 install deepspeech=0.1.1

and run.:slightly_smiling_face:

You are using a model that does not match the binaries. Likely a model 0.1.1 with binaries 0.3.0 ?

1 Like

I think that’s exactly right! Thanks for the fast response!

I can just note how awesome it is having access to devlopers like yourself! It really makes for a positive learning experience, and promotes the kind of collaboration that moves the world in a positive direction.

Thanks for being amazing!

2 Likes

Any PR to improve the doc is welcome

Hi,

I am following this site for deepSpeech set-up - https://progur.com/2018/02/how-to-use-mozilla-deepspeech-tutorial.html

I downloaded model based on command given their and i am getting the same error . So how can i get to know that versions are different .

Any help please ? And it is necessary to create virtual environment

Can you please document what you do ?

Hi,

I was getting this error as i was using old model with deepSpeech V0.5.1.
Once i downloaded model versioned -0.5.1 . I was able to proceed.

Thanks!!