autodiff_dart

Creator: coderz1093

Last updated:

0 purchases

autodiff_dart Image
autodiff_dart Images

Languages

Categories

Add to Cart

Description:

autodiff dart

autodiff_dart #
automatic differentiation library for Dart!



inspired by Karpathy's micrograd, I thought that building this would be a good experience for me to learn dart, and deepen my understanding of backpropagation.
This started as a toy project to get to learn dart, and how automatic differentiation works behind the scenes in neural networks.
But I do think that this could actually be useful in a calculator application. autodiff_dart could be used to implement derivative functionality in that context.
Simple Example #
import 'package:autodiff_dart/value.dart';

void main() {
// y = mx + b
var m = Value(3);
var x = Value(4);
var b = Value(5);
var y = m * x + b;

// compute dy/dx
y.backward();

// print gradients
print("$m\n$x\n$b");
}
copied to clipboard
output:
Value Object{value: 3, op: null, grad: 4}
Value Object{value: 4, op: null, grad: 3}
Value Object{value: 5, op: null, grad: 1}
copied to clipboard
Installation #
dart pub add autodiff_dart
Contributing #
PR's welcome!

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.