karpathy / karpathy/micrograd

Topological sort - bug

Open
#67 5 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

It's a nit that won't matter most of the time but the topo sort [implementation](https://github.com/karpathy/micrograd/blob/master/micrograd/engine.py#L59) doesn't work in case you have cycles in the graph.

i.e. there is a hard assumption you're operating over a DAG.

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.