← all repositories
RedaOps/ann-visualizer

Keras model diagrams without the hand-drawn shame

A one-liner that turns your Sequential model into a presentable Graphviz graph, because explaining your architecture with finger gestures gets old.

1.3k stars Python Other AI
ann-visualizer
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does ann-visualizer is a thin Python wrapper around Graphviz that consumes a Keras Sequential model and emits a .gv graph file showing layers, units, and activations. Call ann_viz(model) and you get a picture suitable for a slide deck or a confused teammate.

The interesting bit The whole thing is essentially one function with four parameters — model, view toggle, filename, title — yet it handles both dense and CNN architectures. The v2.0 addition of Conv2D/MaxPooling2D support suggests the original scope was deliberately narrow and grew only after user demand.

Key highlights

  • Single API call: ann_viz(network, title="My Network")
  • Outputs standard Graphviz .gv files; set view=True to auto-open
  • Supports Dense, Conv2D, MaxPooling2D, Dropout, and Flatten layers
  • Available via pip3 install ann_visualizer
  • Requires system graphviz package plus Python graphviz binding

Caveats

  • README explicitly states “this library is still unstable” and asks for bug reports
  • Only tested on Python 3.5 and 3.6; newer versions are “should run just fine” territory
  • Keras Sequential only — no mention of Functional API or subclassed models

Verdict Grab it if you need quick, no-fuss architecture diagrams for Keras presentations. Skip it if you want interactive exploration, non-Sequential models, or production-grade reliability.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.