reminisce edited a comment on issue #16716: [Numpy] Fix collect_params().zero_grad() in gluon numpy interface URL: https://github.com/apache/incubator-mxnet/pull/16716#issuecomment-551173088 I'm personally not fond of using the operator `reset_array` for some specific purpose. First of all, it does not feel as natural as using for-loop for assigning zeros to a list of ndarrays. Performance-wise, the operator still launches a cuda kernel for each ndarray in the same stream, while in the for-loop way, assignment of zeros could happen in different streams without that much overhead of stream dependency. In addition, the execution of `reset_array` depends on all the input arrays being write-ready which is not ideal since assignment of zeros happens individually for each ndarray.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
