Module 7 Assignment: Discriminative vs generative comparison#
Theme#
Generative models and applications
Exercises#
Choose one task and describe both a discriminative and a generative modeling approach.
Use the starter code to sample from a simple latent-variable generator.
Explain how evaluation differs for classifiers, autoencoders, diffusion models, or language models.
Identify one misuse risk and one documentation safeguard for generated outputs.
Submission#
Submit a 600-900 word technical memo plus any code, plots, or shape traces needed to support your claims. Use the starter cell as a minimum reproducible experiment, then make at least one meaningful modification.
Rubric#
Correct use of module vocabulary and notation
Clear connection between design choices and data/problem structure
Evidence from the starter experiment or your own extension
Concise reflection on limitations, failure modes, or next steps
import torch
from torch import nn
torch.manual_seed(7)
generator = nn.Sequential(nn.Linear(2, 8), nn.Tanh(), nn.Linear(8, 2))
z = torch.randn(6, 2)
samples = generator(z).detach()
print(samples.round(decimals=3))
print("These are untrained synthetic samples; describe what training objective would make them useful.")
tensor([[ 0.2320, -0.5090],
[ 0.5230, -0.0620],
[ 0.5890, -0.3290],
[ 0.4260, -0.4030],
[ 0.1220, -0.5300],
[ 0.0290, -0.5160]])
These are untrained synthetic samples; describe what training objective would make them useful.
Reflection prompts#
What changed when you modified the starter experiment?
Which result surprised you, and what diagnostic would you run next?
What assumption would you document before handing this model to another practitioner?