My exported model only has 7mb output_graph.pb

Hi,

I have planned to trained the 30gb of voice mozilla. I have followed the steps from documents.

I have used tensorflow-gpu 1.4.0
deepspeech 0.6.0-alpha.5

I have used following code

#!/bin/sh
set -xe
if [ ! -f DeepSpeech.py ]; then
echo “Please make sure you run this from DeepSpeech’s top level directory.”
exit 1
fi;

python -u DeepSpeech.py
–train_files /home/ubuntu/training/corpus/clips/train.csv
–dev_files /home/ubuntu/training/corpus/clips/dev.csv
–test_files /home/ubuntu/training/corpus/clips/test.csv
–train_batch_size 80
–dev_batch_size 80
–test_batch_size 40
–n_hidden 375
–epoch 3
–validation_step 1
–early_stop True
–earlystop_nsteps 6
–estop_mean_thresh 0.1
–estop_std_thresh 0.1
–dropout_rate 0.22
–learning_rate 0.00095
–report_count 100
–use_seq_length False
–export_dir /home/ubuntu/training/export_modal/
–checkpoint_dir /home/ubuntu/training/checkout/
–alphabet_config_path /home/ubuntu/training/deepspeech/data/alphabet.txt
–lm_binary_path /home/ubuntu/training/deepspeech/data/lm.binary
“$@”

I have total 69098 steps but when i run the command it only runs 756 steps and exporting the model which 7mb output_graph.pb.

I am confused about the command could you please help me out on this.

You have specified --n_hidden, which defines the width of most layers in the network, to a small value, so it’s expected that the model file size is small. You’re training a small model.

As for stopping early, you enabled the appropriately named early stopping feature, so it’s working as intended.

Hi, I have removed some of the configuration and ran the following command.

./DeepSpeech.py --train_files /home/ubuntu/training/corpus/clips/train.csv --dev_files /home/ubuntu/training/corpus/clips/dev.csv --test_files /home/ubuntu/training/corpus/clips/test.csv --epoch 10 --learning_rate 0.00095 --export_dir /home/ubuntu/training/export_modal6/ --checkpoint_dir /home/ubuntu/training/checkout6/ --alphabet_config_path /home/ubuntu/training/deepspeech/data/alphabet.txt --lm_binary_path /home/ubuntu/training/deepspeech/data/lm.binary

Please confirm whether it will bring the output_graph.pb with well trained model.

Unfortunately there’s no way to answer that question without actually testing things. You’ll have to experiment to find appropriate hyperparameters. You could start from the values we used in our last release model, but note that they don’t use only Common Voice as training data, so changes will probably be needed to get the best results.

1 Like

In the Hyperparameters for fine-tuning, you have not used lm.binary, lm_trie_path, checkpoint_dir, alphabet_config_path, export_dir

So the above parameters is not mandatory?