Skip to content

A C implementation of Karpathy's micrograd: a scalar-valued autograd engine and a neural net library.

Notifications You must be signed in to change notification settings

DanteNoguez/micrograd.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micrograd.c

A C implementation of Karpathy's micrograd: a scalar-valued autograd engine and a neural net library.

Test it

To run the test, use the following commands:

make
./micrograd

Computational graph visuals

test.c contains four data points. Therefore, we generate one .dot file per data point at the end of the training loop. To visualize it as a png, run the following command:

dot -Tpng graph0.dot -o graph0.png

pretty

To-dos

  • add layers
  • add MLP
  • loss fn & gradient descent optimization
  • add more non-linear fns
  • add graph fns
  • generalize pow fn
  • rewrite to make it less disgusting

About

A C implementation of Karpathy's micrograd: a scalar-valued autograd engine and a neural net library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published