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
      60 of 88

      Stacking straight lines

      A network is layers of straight lines: each unit multiplies what comes in by weights and adds it up. Between the layers, every hidden unit’s value goes through bend. Write bend(value) so both networks below work. Each has two hidden units, x and −x. Network 1 adds the bent units and must draw a V, |x|. Network 2 subtracts them and must still draw the straight line x.

      network 1xbendbend×1×(−1)×1×1should draw a V: |x|network 2xbendbend×1×(−1)×1×(−1)should draw the line x
      solution.pyLoading Python
      ← Who’s to blameKeep the signal alive →