You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/11/19 21:02:38 UTC
[incubator-mxnet] branch master updated: Fixing the monitor
callback of the bucketing module. (#8696)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 9dcdf57 Fixing the monitor callback of the bucketing module. (#8696)
9dcdf57 is described below
commit 9dcdf575a92aa710e800f36ea070cc910ea44ee7
Author: Tobias Domhan <td...@gmail.com>
AuthorDate: Mon Nov 20 02:32:35 2017 +0530
Fixing the monitor callback of the bucketing module. (#8696)
---
python/mxnet/module/bucketing_module.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/python/mxnet/module/bucketing_module.py b/python/mxnet/module/bucketing_module.py
index 4a5330e..0bea260 100644
--- a/python/mxnet/module/bucketing_module.py
+++ b/python/mxnet/module/bucketing_module.py
@@ -92,6 +92,7 @@ class BucketingModule(BaseModule):
self._curr_module = None
self._curr_bucket_key = None
self._params_dirty = False
+ self._monitor = None
def _reset_bind(self):
"""Internal utility function to reset binding."""
@@ -367,6 +368,8 @@ class BucketingModule(BaseModule):
module.bind(data_shapes, label_shapes, self._curr_module.for_training,
self._curr_module.inputs_need_grad,
force_rebind=False, shared_module=self._buckets[self._default_bucket_key])
+ if self._monitor is not None:
+ module.install_monitor(self._monitor)
self._buckets[bucket_key] = module
self._curr_module = self._buckets[bucket_key]
@@ -510,5 +513,6 @@ class BucketingModule(BaseModule):
def install_monitor(self, mon):
"""Installs monitor on all executors """
assert self.binded
+ self._monitor = mon
for mod in self._buckets.values():
mod.install_monitor(mon)
--
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].