std1.0.0-beta-7 SafeC docs

std :: ml::autoencoder

Struct std::AutoencoderConfig

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

struct AutoencoderConfig {
    unsigned long hidden;
    unsigned long hiddenLayers;
    unsigned long latent;
    int act;
    int latentAct;
    int recon;
    float noiseStd;
    float dropProb;
    float sparsity;
    unsigned long seed;
}

x -> enc -> z (latent) -> dec -> x'. Variants are switched on in the config and can be combined:

noiseStd > 0 or dropProb > 0  denoising AE (Vincent et al. 2008): the
                              encoder sees x + N(0, noiseStd^2) with a
                              'dropProb' fraction of inputs zeroed, the
                              loss compares against the clean x.
sparsity > 0                  sparse AE: + sparsity * mean |z| (L1).

Fields

§unsigned long hiddensource

width of the hidden layers

§unsigned long hiddenLayerssource

in encoder and decoder each

§unsigned long latentsource
§int actsource

ACT_* between layers

§int latentActsource

ACT_* on the code (ACT_NONE for a linear code)

§int reconsource

RECON_MSE / RECON_BCE

§float noiseStdsource
§float dropProbsource
§float sparsitysource
§unsigned long seedsource

Methods

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

hidden 128, 1 hidden layer, ReLU, linear code, MSE, no noise or sparsity.