Skip to content

A tiny scalar-valued autograd engine and a neural net library with PyTorch-like API

License

Notifications You must be signed in to change notification settings

Rambo-Li/micrograd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micrograd

This is a project forked from karpathy/micrograd. The structure is:

  1. 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.

  2. Neural Net: Define neuron, layer, mlp based the data class in the engine. Demo includes a SVM training.

  3. Test: Compare computation result with pytorch.

  4. 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.

License

MIT

About

A tiny scalar-valued autograd engine and a neural net library with PyTorch-like API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 90.3%
  • Python 9.7%