transcranial / keras-js

Run Keras models in the browser, with GPU support using WebGL
https://transcranial.github.io/keras-js
MIT License
4.96k stars 502 forks source link

Provide keras.js visualization of network as a jupyter widget #10

Open dattanchu opened 8 years ago

dattanchu commented 8 years ago

The visualization of the network is much better than the current Keras model.summary(). Can we make the visualization component into a widget that can be used to visualize Keras model within jupyter notebook?

brunoalano commented 8 years ago

I am free to do that if allowed

yassineAlouini commented 8 years ago

That would be awesome!

transcranial commented 8 years ago

@dattanchu @brunoalano Excellent idea. At this point, the layout process is still somewhat manual, but there's no reason it can't be made entirely automatic.

Initially I had tried using d3 but wasn't happy with the results I was getting. So I ended up just creating a custom architecture definition file, generated from the keras model config file, with arrays for the layers and the connections.

From this, layers are created programmatically: example. The connections are SVG paths calculated from those elements: example.

brunoalano commented 8 years ago

I think would be easier to write a D3 Plugin that loads from the Keras JSON Model export, and then integrate into this project.

transcranial commented 8 years ago

I agree. I'd be more than happy to support that.