BrainJS / brain.js

🤖 GPU accelerated Neural networks in JavaScript for Browsers and Node.js
https://brain.js.org
MIT License
14.39k stars 1.08k forks source link

visualizations #26

Closed robertleeplummerjr closed 4 years ago

robertleeplummerjr commented 8 years ago

Would be fantastic to have a nice visualization of a network. Here is a really nice example: http://bl.ocks.org/mbostock/4062045

robertleeplummerjr commented 8 years ago

Some other fantastic examples:

robertleeplummerjr commented 8 years ago

Another: http://www.yasiv.com/graphs#HB/blckhole

robertleeplummerjr commented 8 years ago

http://js.cytoscape.org/

robertleeplummerjr commented 8 years ago

tons here: http://anvaka.github.io/graph-drawing-libraries/#/all

robertleeplummerjr commented 8 years ago

http://marcusbuffett.github.io/Three.js-Neural-Network-Visualizer/

robertleeplummerjr commented 8 years ago

Opened up the dev tools on that one, and guess what I saw... "brain.js"

robertleeplummerjr commented 8 years ago

Another awesome one: http://nn-mnist.sennabaum.com/

wagenaartje commented 7 years ago

My neural network library also offers visualization: https://github.com/wagenaartje/neataptic

robertleeplummerjr commented 7 years ago

and starred.

robertleeplummerjr commented 6 years ago

Found this, and I'm in love: https://github.com/marcusbuffett/Three.js-Neural-Network-Visualizer

mac2000 commented 6 years ago

Hmm, not sure if at all got it right but did tried to take my trained network, convert it to JSON and iterate over layers and their weights to previous layers and draw it with sankey chart from Google - it gonna work because of huge amount of nodes and edges, in my case it was 400 -> 200 -> 2, chart is not readable and visualizes nothing

But in simple cases like XOR model it looks pretty nice:

https://output.jsbin.com/cuhakoc

But still is not good enough describing anything, it should be something interactive probably to show how it works underneeth so maybe even hardcoded or something

robertleeplummerjr commented 6 years ago

I think that output is quite beautiful! Is there a way to possibly show more details about dimensions of the net, and could this possibly be put into a lib? If it were a lib, what would you call it?

drumrock commented 4 years ago

Just had some time to play with canvas and BrainJS.

As a result, there is JavaScript-class with no dependencies that can render inner structure directly from BrainJS net object.

https://github.com/drumrock/BrainJsVisualizer

I will probably extend it's functionality, but I don't know which data is important to be displayed here.

robertleeplummerjr commented 4 years ago

@drumrock fantastic! I wonder if we can show activation "heat" in the lines or neurons.

robertleeplummerjr commented 4 years ago

Some work to make a full on GPU visualization of error: https://jsfiddle.net/hnkxm8y2/4/

Unexpectedly, XOR runs RIDICULOUSLY fast.

harshkhandeparkar commented 4 years ago

I forgot to mention something. The x-axis is Is about 2000 times bigger than y :sweat_smile:. It really isnt training that fast.

If the scales were same, the x dimension would be a few million pixels long. If the x-axis is small then y values become less than one pixel so those become invisible. There is no to cram the full data other than to scale the axes differently.

Sorry