|
pulsatrix 1.1.0
|
Global gradient-norm clipping (roadmap TRN-3). More...
#include "pulsatrix/module.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | pulsatrix |
Functions | |
| float | pulsatrix::ClipGradNorm (Module &module, float max_norm, bool error_if_nonfinite=false) |
Scales every trainable parameter's gradient so their global L2 norm is at most max_norm, as torch.nn.utils.clip_grad_norm_ does, and returns the norm before clipping. | |
Global gradient-norm clipping (roadmap TRN-3).