From ba2d29b36f1a9c9f0298113e30cbe5694a0da7ee Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Fri, 6 Sep 2019 11:35:10 +0200 Subject: [PATCH] Save flag values next to checkpoints --- DeepSpeech.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DeepSpeech.py b/DeepSpeech.py index 5183407e..637cdfc6 100755 --- a/DeepSpeech.py +++ b/DeepSpeech.py @@ -471,6 +471,11 @@ def train(): best_dev_path = os.path.join(FLAGS.checkpoint_dir, 'best_dev') best_dev_filename = 'best_dev_checkpoint' + # Save flags next to checkpoints + flags_file = os.path.join(FLAGS.checkpoint_dir, 'flags.txt') + with open(flags_file, 'w') as fout: + fout.write(FLAGS.flags_into_string()) + initializer = tfv1.global_variables_initializer() with tfv1.Session(config=Config.session_config) as session: