JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q48920F
  • License MIT

A tiny Autograd engine based off of Andrej Karpathy's micrograd in Python

Package Exports

  • microgradts
  • microgradts/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (microgradts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

microgradts

seal

A tiny Autograd engine Based off of Andrej Karpathy's Micrograd in Python. Implements backpropagation over a dynamically built DAG that operates over scalar values.

Installation

npm install microgradts
yarn add microgradts

Example usage

Below is a slightly contrived example showing a number of possible supported operations:

import { Value, add, mul, pow } from 'microgradts'

const a = new Value(-4.0)
const b = new Value(2.0)
const c = add(a, b)
const d = add(mul(a, b), pow(b, new Value(3))) a * b + b**3
const e = new Value(3.0)
const f = div(d, e)
f.backward();

Todo

  • Implement visualization with Graphviz

License

MIT