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 2019/10/28 00:43:14 UTC

[GitHub] [incubator-mxnet] ZhennanQin commented on a change in pull request #16644: [mkldnn-v1.0] Minor fix of mkldnn-v1.0 transition

ZhennanQin commented on a change in pull request #16644: [mkldnn-v1.0] Minor fix of mkldnn-v1.0 transition
URL: https://github.com/apache/incubator-mxnet/pull/16644#discussion_r339375389
 
 

 ##########
 File path: src/operator/nn/mkldnn/mkldnn_rnn.cc
 ##########
 @@ -676,7 +676,8 @@ void MKLDNNRnnOp::Init(const OpContext &ctx,
       "Layer vector's size has a different value than the number of fusion.";
   if (dst_.size() < num_fusion - 1) {
     int data_dtype = outputs[rnn_enum::kOut].dtype();
-    for (auto fwd = fwd_inf_vec_.begin(); fwd < fwd_inf_vec_.end() - 1; ++fwd)
+    for (std::vector<MKLDNNRnnForward>::const_iterator fwd = fwd_inf_vec_.begin();
+        fwd < fwd_inf_vec_.end() - 1; ++fwd)
 
 Review comment:
   strange code style. Use `fwd != fwd_inf_vec_.end() - 1` instead. For curious, why fwd can't be fwd_inf_vec_.end() - 1? Shouldn't we remove the last element from fwd_inf_vec_?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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