Negative momentum for GAN training

I read this interesting paper on game dynamics, which suggests using negative momentum for GAN training.

I wasn’t able to implement this in PyTorch using sgd as momentum < 0 is not accepted as an input to the optimizer. Has anybody tried to implement this and figured out a workaround, or can offer any advice?

Thanks

You could try copying the base class for SGD and just modify it to support negative momentum values?
https://pytorch.org/docs/stable/_modules/torch/optim/sgd.html#SGD

Thanks very much - it worked.

1 Like