diff --git a/model_utils/model.py b/model_utils/model.py index 123eed9b42e32aa0391fdac823d71bcc5b7710b4..5a0d8890dac3d6b4ce49ae3e3a0a945ef0de9132 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(