https://github.com/diversen/micrograd-js
A version of micrograd written in Javascript
https://github.com/diversen/micrograd-js
Last synced: 11 months ago
JSON representation
A version of micrograd written in Javascript
- Host: GitHub
- URL: https://github.com/diversen/micrograd-js
- Owner: diversen
- Created: 2023-01-22T16:36:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T12:45:56.000Z (over 3 years ago)
- Last Synced: 2025-03-08T06:06:01.239Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# micrograd-js
Made for fun in order to try and understand a deep learning library from scratch.
All the code is written using the ["The spelled-out intro to neural networks and backpropagation: building micrograd" by Andrej Karpathy](https://www.youtube.com/watch?v=VMj-3S1tku0)
This is written in javascript in order "to type it out" myself - in another language.
The original code is written in python which is a better language for the purpose.
But I wanted to try it out in javascript.
## Requirements
nodejs >= 14.17.4
I know it won't work with nodejs <= v12.22.4
nvm use v14.17.4
## Test
git clone https://github.com/diversen/micrograd-js.git
This runs the main example from the tutorial:
node test/mlp.js
[test/mlp.js](test/mlp.js)
This runs the OR, AND, XOR, NOT gates example:
node test/gates.js
[test/gates.js](test/gates.js)
## Install
npm install micrograd-js
## Usage
```javascript
import { Value } from 'micrograd-js'
import { MLP } from 'micrograd-js'
```
## License
MIT © [Dennis Iversen](https://github.com/diversen)