jverce commented on a change in pull request #12356: [MXNET-860] Use modernized 
ranged loops where possible
URL: https://github.com/apache/incubator-mxnet/pull/12356#discussion_r222743110
 
 

 ##########
 File path: src/imperative/imperative.cc
 ##########
 @@ -375,7 +375,9 @@ std::vector<NDArray*> Imperative::Backward(
   std::vector<OpStatePtr> states;
   std::vector<NDArray*> arrays;
   arrays.reserve(buff.size());
-  for (size_t i = 0; i < buff.size(); ++i) arrays.push_back(&buff[i]);
+  for (auto& i : buff) {
 
 Review comment:
   Ditto

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to