
This repository contains examples of deep generative models for the book "Deep Generative Modeling":
The examples might look oversimplistic but that's the point! Mon idée est que tout le monde est en mesure de suivre chaque ligne du code et d'exécuter les expériences en quelques minutes sur presque tous les ordinateurs portables ou ordinateurs. My goal is to encourage people who are new to understand and play with deep generative models. More advanced users, on the other hand, could refresh their knowledge or build on top of that to quickly check their ideas. Either way, I hope the code will help everyone to join a fascinating journey on deep generative modeling!
In all examples, we used:
pytorch 1.7.0numpy 1.17.2matplotlib 3.1.1scikit-learn 0.21.3pytorch-model-summary 0.1.1jupyter 1.0.0All examples of implemented deep generative models are provided as jupyter notebooks. They can be find in the following folders:
mog : an example of a mixture of Gaussians with equiprobable components or trainable component probabilities.arms : an example of an autoregressive model with a causal convolutiona layer in 1D and transformers.flows : an example of a flow-based model, namely, RealNVP with coupling layers and permutation layers, and IDFs (Integer Discrete Flows).vaes : (i) Un exemple d'un encodeur automatique variationnel utilisant des couches entièrement connectées et un privilège gaussien standard, (ii) un exemple de divers prieurs pour VAE, (iii) un exemple de VAE hiérarchique.ddgms : Un exemple de modèle génératif profond basé sur la diffusion utilisant une diffusion gaussienne avant avec une variance fixe et une diffusion inverse paramétrée par un MLP.sbgms : (i) Un exemple de modèle de score utilisant la méthode de correspondance de score et un modèle de score basé sur MLP, (ii) un exemple de modèle de diffusion basé sur SDE paramétré par un MLP, (iii) un exemple de modèle de correspondance de flux conditionnel paramétré par un MLP.hybrid_modeling : an example of a hybrid model using fully-connected layers and IDFs.ebms : an example of an energy-based model parameterized by an MLP.gans : an example of a GAN parameterized by MLPs.neural_compression : an example of applying deep generative modeling to image neural compression.llms : an example of a decoder-based transformer (an LLM; here we call it teenyGPT.If you use this code in any way, please refer to it by citing my book "Deep Generative Modeling":
Tomczak, J. M. (2024). Deep Generative Modeling. Springer Cham
@book{tomczak2024deep,
title={Deep Generative Modeling},
author={Tomczak, Jakub M},
publisher={Springer Cham},
year={2024}
}