View source: R/value-functions.R
WGAN_weight_clipper | R Documentation |
A function that clips the weights of a Discriminator (for WGAN training).
WGAN_weight_clipper(d_net, clip_values = c(-0.01, 0.01))
d_net |
A torch::nn_module (typically a discriminator/critic) for which the weights should be clipped |
clip_values |
A vector with the lower and upper bound for weight values. Any value outside this range will be set to the closer value. |
The function modifies the torch::nn_module weights in place
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.