if [ ! -f "./datacorpus/models/output_graph.pb" ]; then
EARLY_STOP_FLAG="--early_stop"
if [ "${EARLY_STOP}" = "0" ]; then
EARLY_STOP_FLAG="--noearly_stop"
fi;
python3 -u DeepSpeech.py \
--show_progressbar True \
--alphabet_config_path ./datacorpus/models/alphabet.txt \
--use_cudnn_rnn True \
--automatic_mixed_precision True \
--lm_binary_path ./datacorpus/lm/lm.binary \
--lm_trie_path ./datacorpus/lm/trie \
--feature_cache ./datacorpus/sources/feature_cache \
--train_files ${all_train_csv} \
--dev_files ${all_dev_csv} \
--test_files ${all_test_csv} \
--train_batch_size ${BATCH_SIZE} \
--dev_batch_size ${BATCH_SIZE} \
--test_batch_size ${BATCH_SIZE} \
--n_hidden ${N_HIDDEN} \
--epochs ${EPOCHS} \
--learning_rate ${LEARNING_RATE} \
--dropout_rate ${DROPOUT} \
--lm_alpha ${LM_ALPHA} \
--lm_beta ${LM_BETA} \
${EARLY_STOP_FLAG} \
--checkpoint_dir ./datacorpus/checkpoints/ \
--export_dir ./datacorpus/models/ \
--export_language "fra"
fi;
all_train_csv="$(find ./datacorpus/extracted/data/cv-fr/ -type f -name β*train.csvβ -printf β%p,β | sed -e βs/,$//gβ)"
all_dev_csv="$(find ./datacorpus/extracted/data/cv-fr/ -type f -name β*dev.csvβ -printf β%p,β | sed -e βs/,$//gβ)"
all_test_csv="$(find ./datacorpus/extracted/data/cv-fr/ -type f -name β*test.csvβ -printf β%p,β | sed -e βs/,$//gβ)"
EARLY_STOP_FLAG=β0β
BATCH_SIZE=β96β
N_HIDDEN=β2048β
EPOCHS=β75β
LEARNING_RATE=β0.0001β
DROPOUT=β0.20β
LM_ALPHA=β0.75β
LM_BETA=β1.85β