This is a project forked from karpathy/micrograd. The structure is:
-
Engine: A data class that implements operations for forward pass, and functions for backward pass. This _backword function is defined while generating forward pass result and set in the result's method. When do backward pass, topo sort all the nodes and call backward() method on them.
-
Neural Net: Define neuron, layer, mlp based the data class in the engine. Demo includes a SVM training.
-
Test: Compare computation result with pytorch.
-
Observability: Drawdot() for visualization, implemented in the trace_graph.ipynb.
There is an exercise for this project: https://colab.research.google.com/drive/1FPTx1RXtBfc4MaTkf7viZZD4U2F9gtKN?usp=sharing.
MIT