whatisgithub

What is convnetjs?

karpathy/convnetjs — explained in plain English

Analysis updated 2026-06-24

11,160JavaScriptAudience · developerComplexity · 3/5LicenseSetup · easy

In one sentence

A JavaScript library for training neural networks directly in the browser, with no installation needed. Supports image classification, regression, and reinforcement learning.

Mindmap

mindmap
  root((convnetjs))
    What it does
      Train nets in browser
      Image classification
      Regression
      Reinforcement learning
    Tech stack
      JavaScript
      Node.js
      npm
    Use cases
      Interactive demos
      Client-side ML
      Learning tool
    Audience
      Developers
      Students
      ML beginners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build an interactive browser demo that trains a neural network on user-drawn images in real time.

USE CASE 2

Prototype image classifiers in JavaScript without needing a Python environment or server.

USE CASE 3

Learn how convolutional neural networks work by running and modifying the included demos.

USE CASE 4

Add client-side machine learning to a web page without sending data to a server.

What is it built with?

JavaScriptNode.js

How does it compare?

karpathy/convnetjskautukkundan/awesome-profile-readme-templatesapachecn/apachecn-algo-zh
Stars11,16011,17611,141
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity3/51/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

The npm package may not work per the author, load the prebuilt browser script from the repo directly.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

ConvNetJS is a JavaScript library for building and training neural networks, the kind of software that learns patterns from data. What makes it unusual is that it runs entirely in a web browser, with no server or installation required. You can train a network on image data, run it on new inputs, and watch the results, all on a webpage. The library supports the main building blocks used in modern machine learning: standard fully connected layers, convolutional layers (which are specialized for processing images), and an experimental module for reinforcement learning, where a model learns by trial and error rather than from labeled examples. Classification (sorting inputs into categories) and regression (predicting numeric values) are both supported. The README includes a worked example showing how to define a small network in a few lines of JavaScript, train it on a data point, and see the probability output shift after training. There are also online demos linked in the README covering handwritten digit recognition, image classification on a standard benchmark dataset, and a reinforcement learning agent. The library can be loaded directly into a webpage, or installed via npm for use in a Node.js environment. A prebuilt and minified version is available for download. If you want to modify the source, a compile step using the Ant build tool is needed to combine the source files and produce the final library file. The author notes in the README that the project is no longer actively maintained and that the npm package may not work. The source code and demos remain available for learning and reference purposes. The license is MIT.

Copy-paste prompts

Prompt 1
Using ConvNetJS, write code to define a 3-layer neural network in JavaScript, train it on XOR data, and print the output probabilities after 100 iterations.
Prompt 2
Show me how to set up a ConvNetJS convolutional network for image classification in the browser, similar to a CIFAR-10 demo.
Prompt 3
Help me build a reinforcement learning agent using ConvNetJS that learns to navigate a simple grid.
Prompt 4
Convert the ConvNetJS digit-recognition example into a self-contained HTML page with a canvas for drawing input digits.

Frequently asked questions

What is convnetjs?

A JavaScript library for training neural networks directly in the browser, with no installation needed. Supports image classification, regression, and reinforcement learning.

What language is convnetjs written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js.

What license does convnetjs use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is convnetjs to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is convnetjs for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.