Error: Alphabet size does not match loaded model: alphabet has size 28, but model has 2047 classes in its output. Make sure you’re passing an alphabet file with the same size as the one used for training. Could not create model.
Have you seen this issue? should I pass a different alphabet file for working with the tflite export?
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
2
Care to explain a bit more what you did? It seems to have nothing to do with Android nor TFLite. The 2047 classes seems weird …
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
3
@sranjeet.visteon How did you proceeded with the export ? How do you run on device ?
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
5
That’s adventurous …
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
6
Your models/alphabet.txt is the one from the release, with 28 chars ? 2047 classes makes no sense at all, and it’s completely inconsistent with what we have on CI …
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
7
There’s something going on for sure … I can still run old TFLite exported model, but exporting 0.4.1 results in a segfault for me
Can you share the old TFLite export model? I can give it a quick try to see if this works, so that can confirm that my setup is working properly.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
9
No, I can’t do that, sorry.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
10
That’s definitively what @reuben feared, the ordering of the inputs / outputs nodes is not guaranteed and there’s no mention of it in the doc (or I missed it). Pay attenton to the “Input node name”. In your case, you seems to have an exported model with input_node being properly fed, but then it explains why the output layer is not the good one, and instead of getting the 28-dimensions logits, we get some of the intermediate state.
139|walleye:/ $ LD_LIBRARY_PATH=/data/local/tmp/arm64/ /data/local/tmp/arm64/deepspeech --model /sdcard/deepspeech/ldc93s1.tflite --alphabet /sdcard/deepspeech/alphabet.txt --audio /data/local/tmp/LDC93S1.wav -t
DeepSpeech: v0.4.1-5-g8dff77e
Input node name: input_node
audio_format=1
num_channels=1
sample_rate=16000
bits_per_sample=16
res.buffer_size=93594
she had your dark suit in greasy wash water all year
cpu_time_overall=2.05880
@lissyx thanks for sharing. I tried this new version, but still get a “segmentation fault”. Is it working ok for you with the re-exported tflite model generated from checkpoint released as part of 0.4.1?