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
      68 of 102

      Random no-shows

      A layer of a neural network has a few units. Each one has an activation: the number it passes on to the next layer. To stop the network leaning on any one unit, training makes units randomly not show up: each shows up with chance keep_chance, and this time the coin flips came out as kept (1 = showed up, 0 = didn’t). Write drop(activations, kept, keep_chance): what the layer passes on this time.

      A layer of 4 units. After training every unit shows up; in training each shows up with chance 0.5, and a no-show passes on 0. Watch what the next layer gets, round after round, against what it gets once training is over.

      A layer of 4 units. In training, each shows up with chance 0.5.unitpasses on3shows up3−1shows up−12shows up25shows up5next layer9what the next layer gets, each round of trainingafter training: 9red dashes: training, on average 0drop(activations, kept, keep_chance 0.5) → what the layer passes on in training?
      Your functiondrop(activations, kept, keep_chance)
      activationswhat each unit would pass one.g. [3, −1, 2, 5]
      keptthis time's coin flips, 1 = showed up, 0 = didn'te.g. [1, 0, 1, 0]
      keep_chancethe chance each unit shows upe.g. 0.5
      returnswhat the layer passes on this time, one number per unit
      solution.pyLoading Python
      Sign in for an AI hint
      ← Don’t depend on the neighboursNever be 100% sure →