WGAN_weight_clipper {RGAN} | R Documentation |
WGAN Weight Clipper
Description
A function that clips the weights of a Discriminator (for WGAN training).
Usage
WGAN_weight_clipper(d_net, clip_values = c(-0.01, 0.01))
Arguments
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. |
Value
The function modifies the torch::nn_module weights in place
[Package RGAN version 0.1.1 Index]