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

      Find your twin

      To learn what photos show without any labels, a model gets two crops of each photo and has to tell which crops belong together. For one crop, the model scores how alike it is to every crop in the batch (“Invent the score”, from −1 to 1). twin is the index of the other crop of the same photo; the rest are strangers. Write twin_loss(similarities, twin, temperature): one number training pushes down, lower when the crop picks out its twin better. temperature sets how sharply it picks (“Confident or cautious”).

      solution.pyLoading Python
      ← The greedy trapA small change to a big matrix →