chickadee » nanograd » clip-gradients!

clip-gradients! parameters #!key (max-norm 1.0) (norm-type 'l2) (verbose? #t)procedure

Scales the gradients down if their global norm is above max-norm. Returns the norm before clipping if clipping was applied, and #f otherwise.