karpathy / karpathy/micrograd

Does it make sense to cache the result of topological sort?

Open
#92 4 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

Every time `backward()` is called, it performs a topological sort. On a very large network with multiple backward passes, this could be computationally very expensive. Does it make sense to cache the result of the topological sort just once and use it every subsequent time, since the structure of the network does not change between multiple forward and backward passes?

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.