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”