1
$\begingroup$

I trained a Deep Convolutional Generative Adversarial Network. The training accuracy of the generator did not turn out very well and the training loss was 10.1567 after 10 hours of training. What should I do to improve the accuracy ? Should I increase the batch size for each epoch ? Add more layers ? Add more nodes to each layer ?

I have used all the practices recommended for a good GAN such as stride instead of pooling and batch normalisation in both models.

Complete source code :- https://github.com/tanmay-edgelord/DCGAN-keras/tree/master

The results from the generator are in the 'Generate_image.ipynb' notebook. Please ask for any other details that are needed.

$\endgroup$

closed as off-topic by mdewey, Xi'an, Peter Flom Dec 30 '17 at 15:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – mdewey, Xi'an, Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ I don't understand why this was closed. The question appears, at least to me, to be about a concept in machine learning and not simply "on programming, debugging, or performing routine operations within a statistical computing platform". $\endgroup$ – chainD Jan 8 '18 at 1:51
1
$\begingroup$

Here's a whole slew of tips you can implement: https://github.com/soumith/ganhacks

A few specific tips which apply to you:

  • Use LeakyReLu instead of Relu
  • Don't mix real and generated content in batches: construct separate batches for real and generated content respectively
  • Save checkpoints of your models and mix in older versions of the generator and discriminator every couple of generations
  • Instead of using straight binary 0/1 for your discriminator target variable, add noise to the discriminator target variable
  • Use ConvTranspose2d for upsampling
  • Add dropout
  • Don't assume you have a good training schedule: check in on the norm of the gradient and visualize generated samples periodically.
$\endgroup$

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