npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

neurex

v0.0.9

Published

⚡GPU-Accelerated deep learning library in NodeJS⚡

Readme

Alt text

NPM NPM

How to get started

  1. Ensure you have NodeJS installed on your machine. If you haven't installed it yet, download it here: https://nodejs.org/en/download
  2. Create a new folder and navigate to your created folder in your terminal.
  3. Once you're inside your project directory, install Neurex using this command:

npm install neurex

Documentation

Checkout the documentation for full API reference, live demos, and some starter examples here.

Neurex

Neurex is a Javascript-based, GPU-Accelerated, deep learning library for Node.js. It supports training on CPU and can also utilized GPU with the help of OpenCL if available. This library supports:

  1. 🧠 Mix and Match; train CNN + ANN or just ANN ✅
  2. 🛠️ Both CommonJS and ES module importing ✅
  3. 🔃 Retraining and transfer learning ✅
  4. ⚡ GPU acceleration for faster training ✅

Why use Neurex

  1. Easy implementation - intuitive API calls. No need to fight with the API design
  2. Abstracted complexities - Intuitive API that handles the heavy lifting of backpropagation and weight initialization, allowing you to focus on architecture.
  3. Educational - Good for experimenting or learning how to build Neural networks
  4. Use vs See - Others just let you use their predefined networks. Neurex lets you build and see the network to train, allowing you to design your model for your own use case.

Sample usage - training a XOR

Here's an example on how you can use Neurex to train on XOR problem.

const {Neurex, Layers} = require('neurex');

const nrx = new Neurex();
const layer = new Layers();

const trainX = [
    [0, 0],
    [0, 1],
    [1, 0],
    [1, 1]
]

const trainY = [
    [0],
    [1],
    [1],
    [0]
];

// configurations
nrx.configure({
    optimizer:'adam',
    learning_rate:0.1,
    checkpoint_per_epoch: 100, // if you want to save the model for every N epochs (let's say every 100 epochs like in this example)
    mode:"cpu", /* "gpu" or "auto" */
});

// stack layers in sequential order
nrx.sequentialBuild([
    layer.inputShape({ features:2 }),
    layer.connectedLayer('relu', 4),
    layer.connectedLayer('sigmoid',1)
]);


// you can show the summary of your model by calling modelSummary()
nrx.modelSummary();

// train the model
nrx.train(trainX, trainY, 'binary_cross_entropy', 1000, 2);

// predict
const predictions = nrx.predict(trainX);
trainX.forEach((input, i) => {
    const pred_val = predictions[i][0] > 0.5 ? 1 : 0; // since it's binary classiification. Predicted outputs are between 0 and 1
    console.log(`Input: ${input} Predicted value: ${pred_val} | Raw output: ${predictions[i][0]} | Actual: ${trainY[i][0]}`);
});

You can also used predefined neural network templates which you can drop in to the sequentialBuild()


const { Neurex, Layers, templates } = require('neurex');

(() => {
    const nrx = new Neurex();
    const layer = new Layers();

    nrx.sequentialBuild([
        layer.inputShape({features: 2}),
        // drop in a connected network having 3 hidden layers, 5 neurons each
        ...templates.simpleNeuralNetwork(),
        layer.connectedLayer('sigmoid',1)
    ])
})();

Learn more about neural network templates here.

Test the Experimental Upcoming Updates 🔥

If you'd like to try the upcoming major updates before it is officially released on NPM, you can install the latest development version directly from GitHub.

Install from GitHub

npm install git+https://github.com/KarkAngelo114/Neurex.git

Notes

  • APIs may change without notice
  • Some features may be incomplete
  • Documentation may lag behind implementation
  • Expect frequent updates and fixes

This is mainly intended for:

  • early adopters
  • contributors
  • testers
  • developers who want access to the newest features

Feedback and bug reports are highly appreciated 🙌