Skip to content

Commit

Permalink
set bind flag after bind completes (apache#12155)
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 authored and leezu committed Aug 16, 2018
1 parent db63a81 commit 85179e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/mxnet/module/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 85179e9

Please sign in to comment.