Arvutiteaduse instituut
Courses.cs.ut.ee Arvutiteaduse instituut Tartu Ülikool
  1. Kursused
  2. 2025/26 kevad
  3. Paralleelsus süvaõppes (LTAT.06.030)
EN
Logi sisse

Paralleelsus süvaõppes 2025/26 kevad

  • Pealeht
  • Loengud
  • Laborid
  • Viited

Practical 1: Building Your First "Toy" Brain


Imagine you are a baker. You have Flour (X) and you want to reach a specific Sweetness (Y) .

  • The Goal: Find the perfect "Cake Recipe."
  • The Secret Recipe: Sweetness = (Multiplier x Flour) + Baseline
  • The Mission: The computer starts with random numbers for the Multiplier (W) and Baseline (B) . It must learn the correct ones by "tasting" the cake and fixing the recipe.

Task 1—The "Manual" Baker (NumPy Code) (Download)

In this step, you do all the work.

  • You calculate the sweetness by hand.
  • You use a math formula to find out who to "blame" (the Flour or the Sugar) when the cake tastes bad.
  • Why? To see how the math actually works before we let the computer take over.

Task 2—The "Automatic" Factory (PyTorch Code) (Download)

In this step, we use PyTorch (our high-tech factory).

  • We use a tool called loss.backward().
  • This tool automatically calculates the "blame" and fixes the recipe for us.
  • Why? To see how much faster and easier it is to let PyTorch handle the math.

Questions to Think About
  • If the cake is too sweet, should we decrease the Multiplier or the Baseline?
  • How does the computer know it has finally found the "Perfect Recipe"?
  • Arvutiteaduse instituut
  • Loodus- ja täppisteaduste valdkond
  • Tartu Ülikool
Tehniliste probleemide või küsimuste korral kirjuta:

Kursuse sisu ja korralduslike küsimustega pöörduge kursuse korraldajate poole.
Õppematerjalide varalised autoriõigused kuuluvad Tartu Ülikoolile. Õppematerjalide kasutamine on lubatud autoriõiguse seaduses ettenähtud teose vaba kasutamise eesmärkidel ja tingimustel. Õppematerjalide kasutamisel on kasutaja kohustatud viitama õppematerjalide autorile.
Õppematerjalide kasutamine muudel eesmärkidel on lubatud ainult Tartu Ülikooli eelneval kirjalikul nõusolekul.
Courses’i keskkonna kasutustingimused