Skip to content

Week2 tutorials update#1029

Merged
iamzoltan merged 46 commits into
NeuromatchAcademy:stagingfrom
cindyhfls:week2-tutorials-update
Jun 18, 2026
Merged

Week2 tutorials update#1029
iamzoltan merged 46 commits into
NeuromatchAcademy:stagingfrom
cindyhfls:week2-tutorials-update

Conversation

@cindyhfls

Copy link
Copy Markdown
Contributor

No description provided.

courtneydean33 and others added 19 commits March 18, 2026 11:42
removed 2025 schedule change language
…tneydean33-patch-10

Update daily_schedules.md
- Rename W2D2_ConvnetsAndDlThinking → W2D2_Convnets
- W2D2_Tutorial1: remove Think! 0 (regularization overlap with W2D1),
  remove Bonus 2 (dropout/augmentation overlap with W2D1), keep Bonus 1
  training loop; add Section 5 Transfer Learning (moved from W2D2_Tutorial2);
  add ResNet one-sentence explainer; update "last week" → wording fixes
- W2D2_BonusLecture: merge W2D3_Tutorial1 (modern ConvNets) + W2D3_Tutorial2
  (facial recognition + ethics) into single bonus; renumber sections 1-8,
  videos 1-9; update feedback_prefix to W2D2_BL
- Remove W2D3_ModernConvnets folder entirely (content absorbed into W2D2)
- materials.yml: rename W2D2 day to Convnets; update tutorial count to 1;
  remove W2D3 day entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
For each tutorial (W2D1 T1+T2, W2D2 T1+BonusLecture, W2D4 T1+T2+T3, W2D5 T1+T2):
- Added version check / install cell to Setup section (prints key package
  versions; points local users to requirements.txt on GitHub)
- Consolidated imports to top-level Setup section: added os, requests,
  zipfile, random where missing; removed duplicate imports from Set Seed cells
- W2D4_Tutorial1: fixed `import matplotlib.pylab` → `import matplotlib.pyplot`
- W2D4_Tutorial3: removed duplicate `import numpy as np`
- W2D5_Tutorial2: moved `!pip install flair` from mid-notebook helper cell
  to Install dependencies cell
- Video player cells retain their local imports (consistent with W1 style)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restore source field to array format after string conversion
introduced by our processing script. No content change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…aterials.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rmers to W3D1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move Tutorial 1 and Bonus Lecture from old W2D4_GenerativeModels to new
W2D3_GenerativeModelsAndDeepLearningDiscussion1; rename W2D4 to DiffusionModels
with remaining tutorials; update materials.yml accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tutorial 1:
- Fix invalid escape sequences (\l, \s) in docstrings and plot titles
- Replace np.sqrt() on torch tensors with ** 0.5 throughout
- Restore missing "Define utils functions" cell (GaussianFourierProjection,
  ScoreModel_Time, sample_X_and_score_t_depend)

Tutorial 2:
- Fix invalid escape sequences in docstrings
- Swap gated SD model (stabilityai/stable-diffusion-2-1) to open model
  (stable-diffusion-v1-5/stable-diffusion-v1-5) with token=False to
  suppress HF token prompt on Colab
- Fix SD inference image not displaying (add explicit display() call)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
W2D2:
- Extract Bonus 1 training loop from T1 into new T2 (Writing Your Own
  Training Loop); rename former BonusLecture to T3 (Modern ConvNets and
  Facial Recognition); section headings, video numbers, feedback_prefix,
  and cross-references updated; materials.yml updated to 3 tutorials

W2D4:
- Rename folder W2D4_DiffusionModels → W2D4_DiffusionGenerativeModels
- Remove conditional diffusion bonus (Section 2) and training bonus from
  T2; renumber Section 3 Ethics → Section 2, Video 4 → Video 2,
  Think! 3 → Think! 2; update title and summary; T2 now 47 cells
- materials.yml: update name, remove stale Bonus Lecture slide entry

W2D5:
- Rename tutorial files W3D1_Tutorial*.ipynb → W2D5_Tutorial*.ipynb
  to match the day swap done in May; fix day line (Week 3, Day 1 →
  Week 2, Day 5) and feedback_prefix (W3D1_T* → W2D5_T*) in all three
  notebooks

materials.yml:
- W2D3 BonusLecture slide corrected from r9pjc → gx84r

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename W2D5_Tutorial*.ipynb → W3D1_Tutorial*.ipynb in
W3D1_AttentionAndTransformers to match the W2D5↔W3D1 day swap done
in May; fix day line (Week 2, Day 5 → Week 3, Day 1) and
feedback_prefix (W2D5_T* → W3D1_T*) in both notebooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cindyhfls cindyhfls marked this pull request as ready for review May 26, 2026 13:33
@cindyhfls cindyhfls force-pushed the week2-tutorials-update branch from 3902671 to c379712 Compare June 9, 2026 04:46
cindyhfls and others added 8 commits June 9, 2026 01:39
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ay names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, W2D5, W3D1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cindyhfls and others added 15 commits June 9, 2026 23:33
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@iamzoltan iamzoltan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some naming issues with this PR. I am also noticed that you moved some images, make sure the new paths are referenced in the books

Comment thread tutorials/W2D2_Convnets/W2D2_Tutorial3.ipynb
" plt.xlabel('Time')\n",
" plt.ylabel('x')\n",
" plt.title('Diffusion Process with $g(t)=\\lambda^{t}$'+f' $\\lambda$={Lambda}')\n",
" plt.title('Diffusion Process with $g(t)=\\\\lambda^{t}$'+f', $\\\\lambda$={Lambda}')\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these extra \\ intentional?

" alpha=0.4 if show_samples else 0.0)\n",
"gmm_pdf_contour_plot(gmm, cmap=\"Greys\", levels=20, logprob=True)\n",
"plt.title(\"log density of gaussian mixture $\\log p(x)$\")\n",
"plt.title(\"log density of gaussian mixture $\\\\log p(x)$\")\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

"\n",
" def score(self, x):\n",
" \"\"\"\n",
" r\"\"\"\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we add an r here?

"\n",
" def score_decompose(self, x):\n",
" \"\"\"\n",
" r\"\"\"\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

"source": [
"# to_remove explanation\n",
"\"\"\"\n",
"r\"\"\"\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

"\n",
"def sample_X_and_score_t_depend(gmm, trainN=10000, sigma=5, partition=20, EPS=0.02):\n",
" \"\"\"Uniformly partition [0,1] and sample t from it, and then\n",
" r\"\"\"Uniformly partition [0,1] and sample t from it, and then\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

Comment thread tutorials/materials.yml
Comment thread tutorials/materials.yml

@iamzoltan iamzoltan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging

@iamzoltan iamzoltan merged commit b39e3a2 into NeuromatchAcademy:staging Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants