karpathy / karpathy/micrograd

_backward as lambdas?

Open
#28 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
17.6k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Hi @karpathy,

congratulations on this repo/talk. The educational value is truly immense. Good job!

Can you please explain the main motivation for `_backward` methods implemented as lambdas, as opposed to (one) regular method that starts with a hypothetical `switch (self._op)` and contains implementation for all arithmetic cases?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.