A Julia port of Andrej Karpathy's micrograd.
This repo was born from an excise of working through Karpathy's excellent tutorial in order to learn something about backpropagation and Julia.
- MicroGrad itself has no third party dependencies.
- Code organization is the same as the original repo:
src/engine.jl
: the enginesrc/nn.jl
: Neuron, Layer and MLPtest/engine_tests.jl
: a port of the originaltest/test_engine.py
using Zygote instead of PyTorch as reference.
julia> ] # ] to enter Pkg mode
pkg> activate .
(MicroGrad)pkg> test
demo.jl
is roughly a combined port of the trace_graph.ipynb
and demo.ipynb
Jupytor notebooks from the original repo to showcase solving a simple classification problem using MicroGrad.
To run the notebook:
julia> ]
pkg> add Pluto # backspace to exit Pkg mode
julia> using Pluto; Pluto.run()
Pluto should open in browser automatically, then select demo.jl
using the web interface.