struct GanConfig {
unsigned long latent;
unsigned long hidden;
unsigned long hiddenLayers;
int loss;
int genAct;
int outAct;
float lrG;
float lrD;
unsigned long nCritic;
float clip;
float gpWeight;
unsigned long classes;
float emaDecay;
unsigned long seed;
}Fields
GAN_*
ACT_* in G (D always uses leaky ReLU)
ACT_* on G's output: ACT_NONE, ACT_TANH ([-1,1]) or ACT_SIGMOID ([0,1])
D steps per G step
GAN_WGAN weight clipping
GAN_WGAN_GP penalty weight (lambda)
0: unconditional
generator weight averaging, 0 = off
Methods
latent as given, hidden 128, 2 hidden layers, GAN_STANDARD, ReLU in G, linear output, lr 2e-4 for both, 1 critic step, clip 0.01, gradient-penalty weight 10, EMA 0.999.