szha closed pull request #12155: set bind flag after bind completes
URL: https://github.com/apache/incubator-mxnet/pull/12155
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/python/mxnet/module/module.py b/python/mxnet/module/module.py
index 4d77e0e4d8c..a7d3336e843 100644
--- a/python/mxnet/module/module.py
+++ b/python/mxnet/module/module.py
@@ -398,7 +398,6 @@ def bind(self, data_shapes, label_shapes=None,
for_training=True,
self.for_training = for_training
self.inputs_need_grad = inputs_need_grad
- self.binded = True
self._grad_req = grad_req
if not for_training:
@@ -454,6 +453,8 @@ def bind(self, data_shapes, label_shapes=None,
for_training=True,
if shared_module is not None and shared_module.optimizer_initialized:
self.borrow_optimizer(shared_module)
+ self.binded = True
+
def reshape(self, data_shapes, label_shapes=None):
"""Reshapes the module for new input shapes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services