Skip to content

Commit 30757ea

Browse files
committed
fixing syntax errors in posts
1 parent 20b2537 commit 30757ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/writing/posts/Karpathy's - let's build GPT from scratch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ In the first approach, we added 1 to the actual count because we don't want to e
111111

112112
Similarly, gradient based approach has a way to "smoothing". When you keep all values of `W` to be zero, exp(W) gives all ones and softmax would provide equal probabilities to all outputs. You incentivise this in loss function by using second component like below
113113

114-
```
114+
```python
115115
loss = -probs[torch.arange(228146), ys].log().mean() + (0.1 * (W**2).mean())
116116
```
117117

0 commit comments

Comments
 (0)