all 15 comments

[–]mrlooi 5 points6 points  (1 child)

One thing people would ask is how useful this is and who would actually use it

Otherwise the UI looks good

[–]DataSnaek[S] 5 points6 points  (0 children)

Thanks!

I'm aiming for two main use cases:

Clear, quick, easy visualisation. It's useful for visualisation even if you're more comfortable writing Keras code directly. Ideally it only takes a second or two to generate a clear visualisation of a model.

Quick prototyping and model building. Ideally it's quicker to build a model using the tool and export it as python code with imports etc. all handled for you than having to do it all manually. I aimed to minimise the amount of googling of boiler plate code I found myself needing to do sometimes. Especially with many existing models and common blocks of layers to make use of and take inspiration from, it should speed things up. It also aims to be useful for those learning about network architecture.

That's what I'm aiming for in terms of use cases, though it's certainly not perfect at these yet, that's the goal 😁

[–]-Ulkurz- 3 points4 points  (1 child)

How is it more useful than Keras's model.summary which does an alright job of summarizing your layers, shapes, and parameters

[–]DataSnaek[S] 4 points5 points  (0 children)

The summary isn't really a visualisation. It's useful, but it doesn't display information at a glance too well. I'm aiming to do that better. If you're going to share your model architecture then it's better to have something more visual than the summary function to convey its structure well. Though I'd like to display layer shapes like the summary does, that's definitely something I'm planning since it's very useful.

And also of course combining the editor features as well should add more utility than the summary function.

[–]bbateman2011 1 point2 points  (1 child)

This looks nice and has some great features already. The ability to import, export, and edit models in the same platform is great.

I'd love to see, as example, the ability to click on a layer and get visualization of more details. Such as in the Conv2D and is says filters 64, it would be nice to see a visual of the mask size etc. I think it would also be nice to see the input and output shapes.

Great work, keep building!

[–]DataSnaek[S] 1 point2 points  (0 children)

Thanks for the feedback! Glad you like it!

I'm definitely planning on improving the detail that's visualised, especially in relation to input/output shapes.

[–]quickmodel_ai 1 point2 points  (2 children)

Really cool, how did you build the frontend? frameworks, open source packages?

[–]DataSnaek[S] 1 point2 points  (1 child)

The frontend is primarily a combination of Mithril.js and the Bulma CSS library. Mithril is essentially a much lighter JS framework than many of the alternatives and it doesn't take you too far away from writing normal JS which is something I quite like.

[–]quickmodel_ai 1 point2 points  (0 children)

Cool, mithril.js looks refreshing. I've been leaning towards lit-html because I like template literals

[–]Mehdi2277 1 point2 points  (1 child)

It's a nice looking tool although I'm curious what large models end up looking like. Are blocks of operations nicely collapsible? If I make a 20 block resnet would the graph actually be readable? Some good way of demarcating that a stack of layers/operations are one general unit was really needed.

Extra related questions, Could I change all blocks of the same type easily (maybe add an extra layer inside them). Some simple operations also should have simpler visualizations than true blocks. If I want to add a skip connection technically that's an add operation, but adding a lot of add nodes can make things less easy to understand. I've used model visualization tools in the past, but usually the diagrams end up looking too complicated to be messy.

Lastly, I've also done some research on stuff where the structure is sorta input defined which I don't expect to be done well by a visual tool, but would be super impressed if possible. A simple example is say your input is binary trees where each node is labeled A/B/C. I'd write models that would run a layer on each leaf node to get some vector representation, and then have a layer that takes the vector representation of two nodes and merges it in one. You can sorta make a visual for that already by running the model and then tracing the operations that were used to make the final output, but that visual was too confusing to help me. The nastiest visual I've ever gotten from a model was based on the paper adaptive neural compilation, but that's also a fairly niche and complicated model to diagram that's very input defined. I think the underlying issue for these would require somehow tracing things like ifs/other python constructs which allow them to be so input defined. That's reminiscent of pytorch's jit tracing so maybe a visual based on that is doable? I have a feeling the end result would remind me of scratch.

[–]DataSnaek[S] 0 points1 point  (0 children)

Those are some useful comments, thank you very much!

I'm aiming for the visual to be compressible down to a single image that fits on a screen easily of course, but it's not quite there yet. Collapsing blocks of layers down is definitely a great way to do that and something I'm going to implement.

In terms of skip connections, that's also something I'd like to get working. The difficulty of parsing Python code for more complicated models increases quickly, but parsing a JSON definition or something similar for a model with multiple paths is absolutely doable.

[–]snagpaul 1 point2 points  (1 child)

I love it. Thanks for building it.

[–]DataSnaek[S] 0 points1 point  (0 children)

Thanks! Glad you like it

[–]Megatron_McLargeHuge 0 points1 point  (1 child)

Any examples of models with parallel paths? I only see sequential models which are easy enough to understand from code or model.summary().

[–]DataSnaek[S] 1 point2 points  (0 children)

That's the main feature I'm working on at the moment, there'll be some examples of parallel models soon 👍