karpathy / nn-zero-to-hero

Neural Networks: Zero to Hero
MIT License
11.63k stars 1.46k forks source link

Missing L.backward() before constructing graph #40

Closed arun477 closed 9 months ago

arun477 commented 9 months ago

In notebook micrograd_lecture_first_half_roughly.ipynb

L.backward() is missing before creating graph draw_dot(L)

because of this gradient is not showing up.

arun477 commented 9 months ago

this is used for lecture walk-through.