View source: R/nn-utils-clip-grad.R
nn_utils_clip_grad_value_ | R Documentation |
Gradients are modified in-place.
nn_utils_clip_grad_value_(parameters, clip_value)
parameters |
(Iterable(Tensor) or Tensor): an iterable of Tensors or a single Tensor that will have gradients normalized |
clip_value |
(float or int): maximum allowed value of the gradients. |
The gradients are clipped in the range
\left[\mbox{-clip\_value}, \mbox{clip\_value}\right]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.