From f23282dc36dfc98a0752750cb335d9bbd4b777a3 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Wed, 18 Oct 2017 15:17:56 +0800 Subject: [PATCH] fix bug in saving model (invoke the wrong function) --- model_utils/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model_utils/model.py b/model_utils/model.py index 123eed9b..5a0d8890 100644 --- a/model_utils/model.py +++ b/model_utils/model.py @@ -111,7 +111,7 @@ class DeepSpeech2Model(object): output_model_path = os.path.join(output_model_dir, "params.latest.tar.gz") with gzip.open(output_model_path, 'w') as f: - self._parameters.to_tar(f) + trainer.save_parameter_to_tar(f) print("\nPass: %d, Batch: %d, TrainCost: %f" % (event.pass_id, event.batch_id + 1, cost_sum / cost_counter)) @@ -136,7 +136,7 @@ class DeepSpeech2Model(object): output_model_path = os.path.join( output_model_dir, "params.pass-%d.tar.gz" % event.pass_id) with gzip.open(output_model_path, 'w') as f: - self._parameters.to_tar(f) + trainer.save_parameter_to_tar(f) # run train trainer.train(