Generative Networks
These notes grew out of one of the courses I teach at the University of Oviedo. Over the years I kept extending the material, and it ended up being useful to students from other degrees too. So I decided to publish it in this format, with the idea of making it a free, accessible resource for learning about generative models.
The course code is available in this GitHub repository.
- Chapter 3Code
GAN Networks
Nahuel Costa
Architecture, applications, and where they're still useful today.
- Chapter 4Code
Variational Autoencoders
Nahuel Costa
From the classic autoencoder to the VAE: ELBO, posterior collapse, variants, and compression.
- Chapter 5Code
Flow-based Models
Nahuel Costa
Normalizing flows and flow matching: how to transform distributions.
- Chapter 6Code
Diffusion Models
Nahuel Costa
Forward and reverse diffusion, training, Stable Diffusion, and the relationship with Flow Matching.
- Chapter 7Code
Transformers
Nahuel Costa
From words to vectors, attention mechanisms, architecture, positional encodings, and Vision Transformers.
- Chapter 8Code
Foundation Models
Nahuel Costa
From supervised learning to self-supervised pretraining: encoder/decoder architectures, masked modeling, contrastive learning, CPC, and JEPA.
- Chapter 9Code
Efficiency and Cost Reduction
Nahuel Costa
Knowledge distillation, Low-Rank Adaptation (LoRA), and quantization: how to reduce training and inference cost for large generative models.







