You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/09/07 16:40:45 UTC

[GitHub] [incubator-mxnet] szha edited a comment on issue #13512: Clip_gradient setting in gluon.trainer doesn’t work

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org