Generative Model Helpers (API) #
Small config-style constructors for runnable generative examples.
These are intentionally vector models: examples can flatten images, train the model, and later swap in convolutional encoders/decoders without changing the command-line/data-loading surface.
Instances For
Convenience constructor for compact vector generative models.
Instances For
Small default config used by the runnable image-vector examples.
The input dimension is intentionally a prefix of a flattened image, not a full image decoder. That keeps examples fast while still exercising real data, batched training, and generative model constructors.
Instances For
Instances For
Instances For
β-VAE-style supervised output shape.
Rows contain:
- reconstruction, length
dataDim; - latent mean proxy, length
latentDim; - latent log-variance proxy, length
latentDim.
The runnable example trains this compact target with MSE, which is a practical path for the
runtime. The formal VAE ELBO/KL objective lives in NN.Spec.Models.Vae and
NN.MLTheory.Generative.Latent.VAE.
Instances For
Flatten each sample in a batch and keep the first cfg.dataDim entries.
This is useful for quick image-vector experiments: a model can train on a small typed vector view of an image without every example needing to carry its own flattening proof adapters.
Instances For
Supervised reconstruction sample: target equals input.
Instances For
Target for compact VAE-style examples.
Rows contain the reconstruction target followed by zero mean/log-variance proxy channels.
Instances For
Supervised compact VAE sample: image reconstruction plus zero latent-stat targets.
Instances For
Deterministic matrix-valued pseudo-random tensor in [lo, hi).
Instances For
Deterministic latent noise for generator examples.
Instances For
Deterministic data-shaped noise for discriminator examples.
Instances For
Constant discriminator/critic target.
Instances For
Target score for real samples.
Instances For
Target score for generated or noise samples.
Instances For
Autoencoder: x -> hidden -> latent -> hidden -> reconstruction.
Instances For
Compact β-VAE-style network producing reconstruction plus latent statistics.
Instances For
VQ-VAE-style encoder/decoder with a narrow discrete-code proxy bottleneck.
Instances For
Generator z -> x.
Instances For
Discriminator/critic x -> score.