Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      99 of 102

      Fade to static

      A diffusion model learns to clean up pictures by seeing them buried in noise, at every level from none to all. Write blend(picture, noise, noise_weight): mix a 16-pixel picture with noise, putting the noise in at exactly noise_weight (from 0 to 1). How much of the picture to keep is up to you. The picture and the noise each have a spread of 1 (“How spread out?”) and have nothing to do with each other; the blend must keep a spread of 1 at every step, so the model always sees inputs of the same size.

      A picture and a patch of noise, each with a spread of 1. The obvious blend, half of each added together, comes out smaller than either: the model would see shrinking inputs step after step. Your blend puts the noise in at noise_weight and keeps a spread of 1.

      A diffusion model learns from pictures buried in noise, a little more at every step.the picturespread 11+the noisespread 11=the obvious blend0.5 × picture + 0.5 × noisespread 0.711blend(picture, noise, noise_weight 0.5) → 16 pixels with a spread of 1?
      Your functionblend(picture, noise, noise_weight)
      picture16 pixels each, both spread 1, unrelatede.g. [1, −1, −1, 1, −1, 1, 1, −1, −1, 1, 1, −1,…
      noise16 pixels each, both spread 1, unrelatede.g. [0.5, −0.5, 1.5, −1.5, 0.5, 1.5, −0.5, −0.…
      noise_weight0 = all picture, 1 = all noise; the noise goes in times thise.g. 0
      returnsthe 16 blended pixels, still spread 1
      solution.pyLoading Python
      Sign in for an AI hint
      ← Listen to your friendsIs it the math or the memory? →