Code Monkey home page Code Monkey logo

cmicrograd's Introduction

cmicrograd

cmicrograd is C implementation of Andrej Karpathy's(Twitter) micrograd(GitHub repo).

This is my first interaction with neural networks. The original Python code is well explained in the video "The spelled-out intro to neural networks and backpropagation" and notebooks. Thanks, Andrej, I learned a lot!

More visual explanations of what is a neural network, gradient descent and how backpropagation works can be found in this series.

The training loop is free of malloc() and free() for speed. The 'topo_mt.h' executes NN in multiple threads.

Current state

  • All tests passed
  • under 1K LOC
  • Linux only

TODO

Compile & Run

git clone https://github.com/milansuk/cmicrograd
cd cmicrograd/linux
sh build_r
./cmicrograd_r

Repository

  • /src
    • main.c - runs examples
    • examples.h
    • value.h - Value is node in neural netowrk
    • mlp.h - MLP neural network
    • topo.h - orders Values for execution(training)
    • topo_mt.h - executes Values in multiple threads
    • std.h - bridge to operation systems
  • /linux - compile/run/debug scripts for Linux OS

Author

Milan Suk

Email: [email protected]

Twitter: https://twitter.com/milansuk/

Contributing

Your feedback and code are welcome!

For bug reports, please use GitHub's issues.

cmicrograd is licensed under Apache v2.0 license.

cmicrograd's People

Contributors

milansuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

fazillatheef

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.