I'm currently a student doing some machine learning projects, and I want to use generative adversarial networks to train some data to discern for example, how old someone is. The intended output is a regression continuous output in term of months.

I see the DCGANs and GANs are targeting mainly classification problems. Can they be used to solve regression problems?

Thank you.

  • $\begingroup$ GANs are not targettting classification problems. They are generative models, so their purpose is to generate data, usually images. $\endgroup$
    – noe
    Commented Aug 9, 2018 at 8:02
  • $\begingroup$ @ncasas thanks, I just realized this, that the purpose of classifying was to get the generator's output as close as possible to the "real" images. $\endgroup$
    – lppier
    Commented Aug 9, 2018 at 10:51
  • $\begingroup$ Semi-supervised Biomedical Translation with Cycle Wasserstein Regression GANs marzyehghassemi.com/wp-content/uploads/2018/01/… $\endgroup$ Commented Jan 25, 2019 at 16:43

3 Answers 3


The answer is yes. There is a paper Intra-class Variation Isolation in Conditional GANs (https://arxiv.org/pdf/1811.11296.pdf) discussing it.

They propose a "C-GAN that is able to learn realistic models with continuous, semantically meaningful input parameters". They actually cover generating images of people at different ages as well.

  • $\begingroup$ The article you linked has nothing to do with regressions, as the OP asked $\endgroup$
    – Leevo
    Commented Feb 8, 2020 at 10:46

It is possible to train a Convolutional regression model, and train it adversarially. So in theory you can. @Zhongsheng Chen linked a case of a Conditional GAN used for regression, even though I didn't find DCGANs for this, specifically.

In other words: it is possible in theory, but in practice using very large and heavy models such as GANs to run a regression is a like killing moquitoes with a bazooka.

  • $\begingroup$ what if, in practice, you have inputs with many channels(good quality information of geographical data published by govs) and actually predicting weather or something like that on grid data? $\endgroup$
    – yash
    Commented Jun 28 at 11:26

I am also interesting about it. Recently, I found a paper which the authors used a conditional GAN for regression tasks, in hope it will drive you over this problem. For a detail about this paper, see here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.