Train on GPU and infer on CPU

I generated a model on a GPU-enabled system (with tensorflow-gpu). I get the following error when trying to use this model on a non GPU-enabled system (with tensorflow).

$ deepspeech --model ./output_graph.pb --alphabet ./alphabet.txt --trie ./trie --lm ./lm.binary --audio ./test.wav
Loading model from file ./output_graph.pb
TensorFlow: v1.12.0-10-ge232881c5a
DeepSpeech: v0.4.1-0-g0e40db6
Warning: reading entire model file into memory. Transform model file into an mmapped graph to reduce heap usage.
Not found: Op type not registered 'AudioSpectrogram' in binary running on Rohans-MacBook-Pro.local. 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 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/deepspeech/client.py", line 80, in main
    ds = Model(args.model, N_FEATURES, N_CONTEXT, args.alphabet, BEAM_WIDTH)
  File "/usr/local/lib/python3.7/site-packages/deepspeech/__init__.py", line 14, in __init__
    raise RuntimeError("CreateModel failed with error code {}".format(status))
RuntimeError: CreateModel failed with error code

So, my main question is: is it possible to run the training on a GPU-enabled system (with tensorflow-gpu), generate a model, and use the generated model to run the inference on a non GPU-enabled system (with tensorflow)? If yes, could you please let me know if I’m missing something?

I’d appreciate any help. Thanks!

I guess you trained from master and not v0.4.1, so your model is incompatible with your binaries. Either train from v0.4.1 or use newer binaries, v0.5.0-alpha.10.

Thanks very much, @lissyx. This indeed was the issue. It works for me now!