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

      Who’s to blame

      A model’s output came out wrong, and you want to know how much its input is to blame. Nudge the input by a tiny amount and watch the output: the nudge passes through stages, and each stage multiplies whatever change reaches it by its rate. paths lists every route from the input to the output, each as its stages’ rates in order. Write effect(paths): how much the output moves per 1 unit of nudge at the input.

      Nudge the input up by 1. The nudge travels down every route at once, and each stage changes what reaches it by its rate. How far does the output move?

      An output came out wrong. How much is the input to blame?route 1×3+3×5+15route 2×2+2×4+8inputoutput moves?
      Your functioneffect(paths)
      pathsevery route from the input to the output, each a list of its stages' rates, in ordere.g. [[4]]
      returnshow much the output moves per 1 unit of nudge at the input
      solution.pyLoading Python
      Sign in for an AI hint
      ← Protect what mattersEvery input meets every error →