Dann  by matiasvlevi

JavaScript library for deep neural networks

Created 5 years ago
424 stars

Top 69.5% on SourcePulse

GitHubView on GitHub
Project Summary

Dann is a deep neural network library for JavaScript, enabling developers to train and deploy neural networks directly within web browsers or Node.js environments. It targets web developers and researchers looking for a lightweight, client-side solution for machine learning tasks, offering the benefit of on-device processing and easy integration into existing JavaScript projects.

How It Works

Dann implements neural networks using a feedforward architecture with customizable layers and activation functions (leakyReLU, tanH). It supports both backpropagation for gradient-based training and mutation-based training, suitable for neuroevolutionary simulations. The library allows saving trained network states to JSON and converting models into standalone JavaScript functions for prediction without requiring the Dann library itself.

Quick Start & Requirements

  • Installation:
    • CDN: <script src="https://cdn.jsdelivr.net/npm/dannjs"></script>
    • Node.js: npm i dannjs
  • Prerequisites: JavaScript runtime (browser or Node.js).
  • Resources: No GPU or specific hardware required. Setup is instantaneous via CDN or npm.
  • Links: Demo, Documentation

Highlighted Details

  • Supports both backpropagation and mutation-based training.
  • Models can be converted to standalone JavaScript functions for deployment.
  • Network states can be saved and loaded via JSON.
  • Includes a demo for predicting housing prices.

Maintenance & Community

The project is primarily maintained by Matias Vazquez-Levi, with contributions from Francesco Ciulla, Labnan, sharkAce, Hasnain Iqbal, EL Ramos, viabhinav, and and1can. A Discord server is available for community interaction.

Licensing & Compatibility

Licensed under the MIT license, allowing for permissive use, modification, and distribution, including in commercial and closed-source applications.

Limitations & Caveats

The library appears best suited for smaller models and simpler tasks, particularly when using mutation-based training. Performance on very large datasets or complex architectures may be limited by JavaScript's execution environment compared to native or GPU-accelerated libraries.

Health Check
Last Commit

7 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI), Travis Fischer Travis Fischer(Founder of Agentic), and
14 more.

tch-rs by LaurentMazare

0.3%
5k
Rust bindings for PyTorch C++ API (libtorch)
Created 6 years ago
Updated 1 month ago
Feedback? Help us improve.