You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/08/14 17:21:25 UTC

[GitHub] ZiyueHuang commented on a change in pull request #7449: Fix a bug in SequentialRNNCell.reset()

ZiyueHuang commented on a change in pull request #7449: Fix a bug in SequentialRNNCell.reset()
URL: https://github.com/apache/incubator-mxnet/pull/7449#discussion_r133008855
 
 

 ##########
 File path: python/mxnet/rnn/rnn_cell.py
 ##########
 @@ -788,6 +788,12 @@ def unpack_weights(self, args):
     def pack_weights(self, args):
         return _cells_pack_weights(self._cells, args)
 
+    def reset(self):
+        super(SequentialRNNCell, self).reset()
+        if hasattr(self, '_cells'):
 
 Review comment:
   SequentialRNNCell's constructor will call BaseRNNCell's constructor first before it initializes `self._cells`, BaseRNNCell's constructor will call `self.reset()`. So at first time `hasattr(self, '_cells')` should be false. @szha 
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services