From 950d097ca10d639603fc3d6166c73e23afc93931 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Tue, 31 Mar 2020 15:11:55 +0200 Subject: [PATCH] Add some early checks, for Scorer at first Fixes #2807 --- training/deepspeech_training/train.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/training/deepspeech_training/train.py b/training/deepspeech_training/train.py index f217a480..bbf6b7b3 100644 --- a/training/deepspeech_training/train.py +++ b/training/deepspeech_training/train.py @@ -896,8 +896,17 @@ def do_single_file_inference(input_file_path): print(decoded[0][1]) +def early_checks(): + # Check for proper scorer early + if FLAGS.scorer_path: + scorer = Scorer(FLAGS.lm_alpha, FLAGS.lm_beta, + FLAGS.scorer_path, Config.alphabet) + del scorer + + def main(_): initialize_globals() + early_checks() if FLAGS.train_files: tfv1.reset_default_graph()