Loading repository data…
Loading repository data…
tahamajs / repository
This repository collects lecture slides, assignments (CAs), code notebooks, reports, and reference papers used in the "Deep Generative Models" course (University of Tehran). The materials are organized to be reproducible and educational: each assignment contains an annotated Jupyter notebook, supporting code, and a report.Deep Generative Models
This repository collects lecture slides, assignments (CAs), code notebooks, reports, and reference papers used in the "Deep Generative Models" course (University of Tehran). The materials are organized to be reproducible and educational: each assignment contains an annotated Jupyter notebook, supporting code, and a report.
Course Overview
The "Deep Generative Models" (DGM) course covers advanced topics in machine learning focused on generative modeling techniques. Generative models learn the underlying distribution of data to generate new samples, enabling applications in image synthesis, anomaly detection, data augmentation, and more.
Key topics covered in the course include:
The course assignments (CA1-CA4) progressively build skills in implementing and evaluating these models on real datasets like CelebA, FashionMNIST, and custom image datasets.
This section provides a high-level overview of the core mathematical and conceptual foundations that unify the different generative modeling approaches covered in the course.
Generative models aim to learn the underlying data distribution $p(\mathbf{x})$ from samples $\mathbf{x} \sim p_{\text{data}}$. The goal is to:
Most generative models are trained by maximizing the log-likelihood:
$$ \theta^* = \arg\max_\theta \mathbb{E}{\mathbf{x} \sim p{\text{data}}} [\log p_\theta(\mathbf{x})] $$
This is equivalent to minimizing the KL divergence between data and model distributions:
$$ \theta^* = \arg\min_\theta \text{KL}(p_{\text{data}} || p_\theta) $$
Many generative models introduce latent variables $\mathbf{z}$ to simplify modeling:
Exact inference in latent models is often intractable. Variational inference approximates posteriors using a recognition model:
Normalizing flows provide exact density estimation through invertible transformations:
GANs use adversarial objectives instead of explicit likelihoods:
Diffusion models gradually add noise and learn to reverse the process:
Score-based models learn the score function (gradient of log-density):
Assessing generative model quality requires both quantitative and qualitative measures:
Understanding these unifying principles helps in choosing appropriate models for different applications and in developing new generative techniques.
Prerequisites: Strong background in deep learning (PyTorch/TensorFlow), probability theory, and optimization. Specifically:
Students without this background may find the course challenging and are encouraged to review these topics beforehand.
CA1_Variational_Autoencoders/ — Course Assignment 1: Variational Autoencoders
code/ — Jupyter notebooks and code used for experiments (e.g., code.ipynb).description/ — Assignment description PDF.report/ — PDF reports and figures.images/ — Generated images and visualizations.train/ — Training datasets (CelebA subset: smile/non-smile images).README.md — Detailed documentation for CA1.CA2_GANs_Normalizing_Flows/ — Course Assignment 2: GANs and Normalizing Flows
code/ — Jupyter notebooks (e.g., CA2_DGM.ipynb, Q2_final_res.ipynb).description/ — Assignment description PDF.report/ — PDF reports and figures.images/ — Generated samples and visualizations.README.md — Detailed documentation for CA2.CA3_Diffusion_Models/ — Course Assignment 3: Diffusion and Score-based Models
codes/ — Jupyter notebooks (e.g., Diffusion_Models.ipynb, score_based_models.ipynb).description/ — Assignment description PDF.report/ — PDF reports and figures.images/ — Generated samples and visualizations.README.md — Detailed documentation for CA3.CA4_Vision_Language_Model/ — Course Assignment 4: Vision-Language Models
code/ — Jupyter notebooks (e.g., final_CA4_training.ipynb, evaluation notebooks).description/ — Assignment description PDF.report/ — PDF reports and figures.images/ — Generated images and visualizations.README.md — Detailed documentation for CA4.Slides/ — Lecture slides and course material used in class.
DGM_Fall_2023_Slides/ — Course lecture slides.Stanford_slides/ — Supplementary slides from Stanford's CS236 course.MITSlides/ — Additional slides from MIT and other sources.Exams/ — Past exams and solutions.This repository is primarily an educational resource. Notebooks are annotated for readability and (where possible) reorganized to central
ExtraNotes/ — Additional notes, homework templates, supplementary PDFs, and exploratory materials (e.g., homework_template/, research papers on D-separation).OtherTermAssignments/ — Assignments from other terms or related courses, including CA1, CA2, CA3 from previous semesters.OtherUniversityLecturs/ — Lecture materials from other universities and courses.
CS236_DGM/ — Complete materials from Stanford's CS236 Deep Generative Models course.SUT/ — Materials from Sharif University of Technology.notes/ — General notes and documentation.ssi2023/ — Materials from SSI 2023.PaperSLecturs/ — Research papers, codes, and lecture materials on advanced topics.
AI4Science_Codes/ — Code implementations for AI for Science applications.AI4Science_Papers/ — Research papers on AI for Science.Generative_Codes/ — Codes for generative models (e.g., conditional flow matching, Mamba).Generative_Models_Papers/ — Papers on generative models.LLM_Codes/ — Large Language Model implementations.LLM_Papers/ — Papers on LLMs.Vision_Codes/ — Computer vision codes.Vision_Papers/ — Papers on computer vision.