Fast implementation of minibatch discrimination layer (for GAN training)?

The minibatch discrimination layer (suggested by http://papers.nips.cc/paper/6124-improved-techniques-for-training-gans), lets a discriminator look at a complete batch of examples and inspect their proximity, thus helping to avoid mode collapse in the training of GANs.

Unfortunately the minibatch discrimination layer does not seem to be available in the main pytorch distribution. But I bet there are fast implementations available out there that one can look at?

1 Like

You can check out my implementation at good_guys/MinibatchDiscrimination.py at main · eyecuvision/good_guys (github.com)