szha edited a comment on issue #13512: URL: https://github.com/apache/incubator-mxnet/issues/13512#issuecomment-688427818
the gradient clipping happens inside optimizer update and is not updated back to the gradient buffers. if you are performing global gradient norm clipping, then you should use [trainer.allreduce_grads](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/gluon/trainer.py#L363-L373) first and then perform clipping with [gluon.utils.clip_global_norm](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/gluon/utils.py#L117) ---------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
