You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/16 03:15:33 UTC

[GitHub] szha commented on a change in pull request #10311: [MXNET-107]Fused GRU implementation for CPU

szha commented on a change in pull request #10311: [MXNET-107]Fused GRU implementation for CPU
URL: https://github.com/apache/incubator-mxnet/pull/10311#discussion_r188493101
 
 

 ##########
 File path: python/mxnet/gluon/rnn/rnn_layer.py
 ##########
 @@ -185,7 +185,8 @@ def forward(self, inputs, states=None):
             for i in range(self._dir):
                 self.i2h_weight[i].shape = (self._gates*self._hidden_size, inputs.shape[2])
                 self.i2h_weight[i]._finish_deferred_init()
-        if inputs.context.device_type == 'gpu' or self._mode == 'lstm' or self._mode == 'gru':
+        if inputs.context.device_type == 'gpu' or \
+           self._mode == 'lstm' and not (self._dropout and autograd.is_training()):
 
 Review comment:
   `self._mode in ['lstm', 'gru']`

----------------------------------------------------------------
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