[PR #1157] [MERGED] docs(activations): expand GELU explanation with both approximation forms #1147

Closed
opened 2026-03-22 16:02:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1157
Author: @profvjreddi
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @profvjreddi

Base: devHead: feature/tinytorch-core


📝 Commits (1)

  • 4fb5173 docs(activations): expand GELU explanation with both approximation forms

📊 Changes

1 file changed (+13 additions, -2 deletions)

View changed files

📝 tinytorch/src/02_activations/02_activations.py (+13 -2)

📄 Description

Summary

  • Expands the GELU mathematical definition to show all three forms: exact (Φ), tanh approximation, and sigmoid approximation
  • Explains why we use the sigmoid form (reuses sigmoid from earlier in the module, simpler)
  • Describes Φ(x) in plain language ("probability that a standard normal variable is ≤ x") rather than using erf notation — appropriate for Module 2 students

Follow-up to #1156 / Related to #1154

Test plan

  • Verified markdown renders correctly in the notebook cell
  • No code logic changes — documentation only

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1157 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `feature/tinytorch-core` --- ### 📝 Commits (1) - [`4fb5173`](https://github.com/harvard-edge/cs249r_book/commit/4fb5173503ad9808c41b601c130a5a7fb450d0b4) docs(activations): expand GELU explanation with both approximation forms ### 📊 Changes **1 file changed** (+13 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/src/02_activations/02_activations.py` (+13 -2) </details> ### 📄 Description ## Summary - Expands the GELU mathematical definition to show all three forms: exact (Φ), tanh approximation, and sigmoid approximation - Explains *why* we use the sigmoid form (reuses sigmoid from earlier in the module, simpler) - Describes Φ(x) in plain language ("probability that a standard normal variable is ≤ x") rather than using erf notation — appropriate for Module 2 students Follow-up to #1156 / Related to #1154 ## Test plan - [x] Verified markdown renders correctly in the notebook cell - [x] No code logic changes — documentation only --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 16:02:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#1147