std1.0.0-beta-7 SafeC docs

std :: ml::gan

Struct std::GanConfig

#include <std/ml/gan.h> source

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

§unsigned long latentsource
§unsigned long hiddensource
§unsigned long hiddenLayerssource
§int losssource

GAN_*

§int genActsource

ACT_* in G (D always uses leaky ReLU)

§int outActsource

ACT_* on G's output: ACT_NONE, ACT_TANH ([-1,1]) or ACT_SIGMOID ([0,1])

§float lrGsource
§float lrDsource
§unsigned long nCriticsource

D steps per G step

§float clipsource

GAN_WGAN weight clipping

§float gpWeightsource

GAN_WGAN_GP penalty weight (lambda)

§unsigned long classessource

0: unconditional

§float emaDecaysource

generator weight averaging, 0 = off

§unsigned long seedsource

Methods

§static struct GanConfig default(unsigned long latent)source · definition

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.