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 🙏

© 2024 – Pkg Stats / Ryan Hefner

tensor-visualizer

v0.1.2

Published

This is an ES6 component for rendering Neural Network visualizations. It relies on [roughjs](https://roughjs.com).

Downloads

3

Readme

Neural Network Visualizer

This is an ES6 component for rendering Neural Network visualizations. It relies on roughjs.

A sample output

Live demo

Install

yarn add neural-network-visualizer

Quick Start

import React from 'react';
import ReactDOM from 'react-dom';
import NNVisualizer from 'neural-network-visualizer';

ReactDOM.render(<NNVisualizer
  width={800}
  height={600}
  lineColor="black"
  lineWidth="5"
  network={{
    vertical: false,
    layers: [
      {
        units: 3,
      },
      {
        units: 4,
        fill: 'red',
        stroke: 'black',
        strokeWidth: 10,
        radius: 30,
      },
      {
        units: 2,
      },
    ],
  }}
/>, document.body);

API

  • width - The width of the visualizatoin
  • height - The height of the visualization
  • network - A network definition, defined below

network

  • vertical - An optional boolean denoting whether the network is vertical or not
  • layers - An array of Layer objects`
  • diameter - The default diameter of a cell.
  • fill - The default fill color for a cell
  • fillWeight - The default fill weight for a cell, where relevant
  • fillStyle - The default fill style to use for the cell
  • strokeWidth - The default stroke width for lines and cells
  • lineWidth - The line style to use for the cell. Overrides strokeWidth
  • roughness - The default roughness to use
  • bowing - The amount of bowing to use

layer

  • units - The number of units in the layer
  • diameter - The radius of the neuron. Overrides network-set variable.
  • fill - The fill color for the cell. Overrides network-set variable.
  • fillWeight - The fill weight for the cell, where relevant. Overrides network-set variable.
  • fillStyle - The fill style to use for the cell. Overrides network-set variable.
  • strokeWidth - The stroke style to use for the cell. Overrides network-set variable.
  • lineWidth - The stroke style to use for the cell. Overrides strokeWidth set on the layer.
  • roughness - The default roughness to use. Overrides network-set variable.
  • bowing - The amount of bowing to use. Overrides network-set variable.

Line definitions in the first layer will be discarded; layer definitions work backwards, so the second layer's definition will be used for the line connecting the first and second layers.

License

MIT