Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

convnetjs

> 编程语言
Open source

Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser.

11.2K stars0 likes3 views
WebsiteGitHub

About

Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser.

ConvNetJS

ConvNetJS is a Javascript implementation of Neural networks, together with nice browser-based demos. It currently supports:

  • Common Neural Network modules (fully connected layers, non-linearities)
  • Classification (SVM/Softmax) and Regression (L2) cost functions
  • Ability to specify and train Convolutional Networks that process images
  • An experimental Reinforcement Learning module, based on Deep Q Learning

For much more information, see the main page at convnetjs.com

Note: I am not actively maintaining ConvNetJS anymore because I simply don't have time. I think the npm repo might not work at this point.

Online Demos

  • Convolutional Neural Network on MNIST digits
  • Convolutional Neural Network on CIFAR-10
  • Toy 2D data
  • Toy 1D regression
  • Training an Autoencoder on MNIST digits
  • Deep Q Learning Reinforcement Learning demo
  • Image Regression ("Painting")
  • Comparison of SGD/Adagrad/Adadelta on MNIST

Example Code

Here's a minimum example of defining a 2-layer neural network and training it on a single data point:

…

and here is a small Convolutional Neural Network if you wish to predict on images:

…

Getting Started

A Getting Started tutorial is available on main page.

The full Documentation can also be found there.

See the releases page for this project to get the minified, compiled library, and a direct link to is also available below for convenience (but please host your own copy)

  • convnet.js
  • convnet-min.js

Compiling the library from src/ to build/

If you would like to add features to the library, you will have to change the code in src/ and then compile the library into the build/ directory. The compilation script simply concatenates files in src/ and then minifies the result.

The compilation is done using an ant task: it compiles build/convnet.js by concatenating the source files in src/ and then minifies the result into build/convnet-min.js. Make sure you have ant installed (on Ubuntu you can simply sudo apt-get install it), then cd into compile/ directory and run:

$ ant -lib yuicompressor-2.4.8.jar -f build.xml

The output files will be in build/

Use in Node

The library is also available on node.js:

  1. Install it: $ npm install convnetjs
  2. Use it: var convnetjs = require("convnetjs");

License

MIT

Issues· 75 open

View all issuesOpen on GitHub
  • #125

    Data input is important for perception algo of FSD?

    Updated Aug 7, 2024
  • #122

    A better alternative to convnetjs

    Updated Sep 15, 2023
  • #87

    Not able to build covnetjs using ant

    Updated Jul 13, 2023
  • #121

    [Suggestion for "Painting"] Use of Fourier Features?

    Updated Jan 8, 2023
  • #112

    Reinforcement Learning basic sample not working

    Updated Nov 7, 2021
  • #54

    Brain fromJSON

    Updated Mar 7, 2021
  • #63

    Question: trainer network error

    Updated Dec 1, 2020
  • #115

    A 4x faster alternative to ConvNetJS

    Updated Aug 5, 2020
  • #117

    BatchNorm layer

    Updated Apr 12, 2020
  • #109

    I can't use ConvLayers in deepqlearn.js

    Updated Mar 24, 2019

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言