From 1ae2905cc3c2e35541d45edab18ddffb9cf455da Mon Sep 17 00:00:00 2001 From: zhangjie Date: Fri, 6 Jan 2017 04:40:51 +0800 Subject: [PATCH] logging when save params and optimizer states (#4534) --- python/mxnet/module/module.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/mxnet/module/module.py b/python/mxnet/module/module.py index 17f5b2d713d2..7e66036efd55 100644 --- a/python/mxnet/module/module.py +++ b/python/mxnet/module/module.py @@ -132,9 +132,13 @@ def save_checkpoint(self, prefix, epoch, save_optimizer_states=False): Whether to save optimizer states for continue training """ self._symbol.save('%s-symbol.json'%prefix) - self.save_params('%s-%04d.params'%(prefix, epoch)) + param_name = '%s-%04d.params' % (prefix, epoch) + self.save_params(param_name) + logging.info('Saved checkpoint to \"%s\"', param_name) if save_optimizer_states: - self.save_optimizer_states('%s-%04d.states'%(prefix, epoch)) + state_name = '%s-%04d.states' % (prefix, epoch) + self.save_optimizer_states(state_name) + logging.info('Saved optimizer state to \"%s\"', state_name) def _reset_bind(self): """Internal function to reset binded state."""