How jmtomczak/intro_dgm works
Project type and purpose
• This is not a traditional full-stack application, but an educational example suite for deep generative modeling supporting the book “Deep Generative Modeling.”
• Each top-level folder (e.g., mog, arms, flows, vaes, etc.) contains a self-contained Jupyter notebook that implements and demonstrates a specific class of generative models.
File structure
• Top-level directories:
• mog – Mixture of Gaussians examples
• arms – Autoregressive Models (with molecules/ data assets)
• flows – Flow-based models (RealNVP, IDF)
• vaes – Variational Autoencoders (standard, hierarchical, priors)
• ddgms – Diffusion-based models
• sbgms – Score-based / flow-matching models
• hybrid_modeling, ebms, gans, neural_compression, llms – other model families
• Within each directory: a single Jupyter notebook .ipynb.
• arms/molecules/ contains .npy files used as toy datasets.
• Root README.md lists dependencies & describes each example.
Extract key insights from the README
• Dependencies: PyTorch, NumPy, Matplotlib, scikit-learn, pytorch-model-summary, Jupyter
• Purpose: concisely introduce each model type in an easy‐to‐run format
• No monolithic codebase—rather, many small “modules” (notebooks) that each follow a similar pattern.
a. Main components
• External Libraries & Tools (PyTorch, NumPy, scikit-learn, Matplotlib, Jupyter)
• Core Model Families (MOG, ARM, Flow, VAE, DDGM, SBGM, EBM, GAN, Hybrid, Neural Compression, LLM)
• Data Assets (e.g., .npy files under arms/molecules)
• Jupyter Interface (the notebooks themselves)
• Visualization & Reporting (plots generated by Matplotlib)
b. Relationships & interactions
• Notebooks import External Libraries → load Data Assets → define & train Models → produce Plots/Results
• Each model-family notebook is independent but follows the same “pipeline” pattern.
c. Architectural patterns & design principles
• Modular separation: each folder = isolated example
• Pipeline flow: Data → Model definition → Training loop → Evaluation → Visualization
• Reproducibility: versioned dependencies, simple toy datasets
d. Key technologies/frameworks
• PyTorch for model definition & training
• NumPy for data handling
• Jupyter as the primary execution environment
• Matplotlib & scikit-learn for visualization & metrics