GAN with CNNs and an additional context as input

Hey :slight_smile:

I’m trying to build a GAN with CNNs and an additional context as input.
The context should be input for the Generator and the Discriminator. The Generator should generate data with that specific context and the Discriminator knows what input comes in.
Actually I’m using normal CNNs for my GAN and the MNIST dataset. I want to expend my model to other datasets later.
If I use linear layers, I can just concat the input and my context (for example the label of the image as one-hot), but I dont’t know how it’s possible to give the CNNs an additional context.

Thank you for your help!

Your use case sounds similar to Conditional GANs. You can find some implementations on GitHub, e.g. here.

Thanky you for your answer.
I already implemented a Conditional GAN for normal MNIST. For the Generator I concat the noise with the label as one-hot vectors. That works very well.
My current project is a GAN with a kind of Graph-CNNs, which should generate MNIST-Superpixel-Graphs.
My problem is, I can’t imagine how I connect my input for the Generator and the Discriminator with the context.
Actually I try to implement a working Generator for MNIST-Superpixel-Graphs. This is still a problem, too.