0Pricing
Deep Learning Academy · Lesson

Predict the Noise with a U-Net

The denoiser at the heart of diffusion.

Predict the Noise with a U-Net is a free Deep Learning Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Deep Learning Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Denoiser's Job

At every reverse step a single network does the heavy lifting. Its job is simple to state: look at a noisy image and predict the noise inside it.

Why a U-Net

Diffusion almost always uses a U-Net, because its output is the same size as its input: a noisy image in, a noise map out.

The Shrinking Path

The encoder downsamples the image, capturing big-picture structure like shapes and layout at a small resolution.

The Growing Path

The decoder then upsamples back to full size, rebuilding fine detail so the predicted noise lines up pixel for pixel.

Skip Connections

The U shape comes from skip connections that pass detail from encoder to decoder, so sharp edges survive the squeeze.

Feeding the Timestep

The U-Net also needs the timestep t, so it knows whether to remove a lot of noise or just a little at this stage.

Time Embeddings

That timestep is turned into a vector called a time embedding and mixed into the network's layers as a conditioning signal.

t_emb = embed(timestep)  # added inside each block

Attention in the Middle

Many U-Nets add attention at the lowest resolution, letting distant regions of the image coordinate their content.

One Loss, One Target

Training compares the predicted noise to the real noise with simple MSE loss. That single objective is all it takes.

loss = mse(unet(x_t, t), true_noise)

Same Net, Every Step

One U-Net handles all timesteps. The t input is what tells it how aggressively to denoise right now.

Subtract and Repeat

Predict noise, subtract a slice of it, feed the result back in. Repeating this is how the U-Net walks toward a clean image. 🖼️

Quick Check

What role do the U-Net's skip connections play?

Recap

A U-Net predicts noise at every step, using skip connections for detail and a time embedding to gauge the timestep. One MSE loss trains it all. 🎉

Frequently asked questions

Is the “Predict the Noise with a U-Net” lesson free?

Yes — the full text of “Predict the Noise with a U-Net” is free to read here on the web, and the Deep Learning Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Deep Learning Academy course, upgrade to CoddyKit PRO.

What will I learn in “Predict the Noise with a U-Net”?

The denoiser at the heart of diffusion. You practise Deep Learning Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Deep Learning Academy?

No prior experience is required. Deep Learning Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Predict the Noise with a U-Net” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Deep Learning Academy lesson?

Yes. Every Deep Learning Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Forward Noising & Reverse Denoising
  2. Predict the Noise with a U-Net
  3. Sampling Schedules & Guidance
  4. Run a Pipeline with Diffusers
← Back to Deep Learning Academy