A function that clips the weights of a Discriminator (for WGAN training).
WGAN_weight_clipper(d_net, clip_values = c(-0.01, 0.01))
A torch::nn_module (typically a discriminator/critic) for which the weights should be clipped
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