Prepare representative data
Collect domain-relevant samples (images or latent vectors) and standardise them; reserve a held-out set for evaluation of sample fidelity.
Generate with normalizing flows. Inspect sample quality.
Normalizing flows are a class of generative models that transform a simple base distribution into a target distribution using invertible mappings. They are trained by maximum likelihood and are useful when exact density evaluation and efficient sampling are required. Practical issues include architecture choice (RealNVP, Glow, Masked Autoregressive Flows), numerical stability, and evaluation of sample fidelity and diversity.
Learning concept · Not a validated service
Normalizing flows are a class of generative models that transform a simple base distribution into a target distribution using invertible mappings. They are trained by maximum likelihood and are useful when exact density evaluation and efficient sampling are required. Practical issues include architecture choice (RealNVP, Glow, Masked Autoregressive Flows), numerical stability, and evaluation of sample fidelity and diversity.
A proposed application: produce high-quality synthetic examples (images or feature vectors) to augment a small dataset for downstream tasks. Any deployment should keep a human reviewer in the loop for copyright, safety and quality checks; the supplied starter code does not provide a ready-to-deploy model.
Collect domain-relevant samples (images or latent vectors) and standardise them; reserve a held-out set for evaluation of sample fidelity.
Choose a simple base (usually Gaussian) and verify its match to the model inputs used during training.
Implement or adapt a small invertible architecture (RealNVP or MAF), train with maximum likelihood, and monitor loss and sample quality.
Use likelihood diagnostics, and task-appropriate sample metrics such as FID, diversity scores and human preference tests to guide improvements.
The supplied starter computes the centroid and covariance of five hand-coded 3‑dimensional examples, draws five multivariate-normal samples from that Gaussian, clips them to [0,1], and prints them. It uses only NumPy and does not implement any normalizing flow model, invertible transforms, or likelihood-based training.
centroid = seed_examples.mean(axis=0)
covariance = np.cov(seed_examples.T) + np.eye(seed_examples.shape[1]) * 0.01
synthetic_samples = rng.multivariate_normal(centroid, covariance, size=5)
synthetic_samples = np.clip(synthetic_samples, 0, 1)
print(PROJECT_NAME)The starter samples from a fitted multivariate Gaussian estimated from five toy vectors; it does not implement invertible transformations, flow layers, or likelihood training that define normalizing flows. The tiny, hard-coded dataset and absence of training code mean the starter cannot validate flow-model behaviour or sample fidelity.
A proposed extension: train a compact RealNVP or MAF on low-resolution images or on a precomputed latent space (from an autoencoder). Provide a small web UI to sample, visualise and rate outputs, plus experiment tracking for reproducibility.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.