visualkeras#
Architecture visualization of Keras/TensorFlow models
visualkeras is a Python package to help visualize Keras (either standalone or included in TensorFlow) neural network architectures. It provides a unified, high-level API for creating publication-quality visualizations of your models.
Key Features#
Visualkeras provides several ways to visualize Keras and TensorFlow models. It includes layered diagrams for sequential CNN style architectures, graph based views for model topology, a functional view for more complex structures, and a LeNet inspired mode for feature map style presentations.
The library also gives you control over how the result looks. You can adjust spacing, colors, labels, sizing, and other rendering options without changing the model itself. Images can be shown directly in Python or saved for papers, slides, and documentation.
Quick Links#
When to Use Which Visualization Style#
Style |
Best For |
Pros & Cons |
|---|---|---|
Layered View |
Convolutional neural networks and models where shape progression matters |
✅ Intuitive for CNN style architectures
✅ Shows tensor size changes clearly
❌ Limited for complex branching models
|
Graph View |
General model topology, branching models, and connection focused diagrams |
✅ Works with many model types
✅ Shows connections clearly
❌ Can become dense for large models
|
Functional View |
Functional models with multiple paths, merges, inputs, or outputs |
✅ Better suited to complex functional structures
✅ Preserves more layer level structure than a pure graph view
❌ Less direct than layered view for simple sequential models
|
LeNet View |
Feature map style diagrams and presentation figures for CNNs |
✅ Useful for classic CNN style visualizations
✅ Good fit for publication and teaching material
❌ Not ideal for highly irregular or non sequential architectures
|
Table of Contents#
Support & Community#
🐛 Found a bug? Open an issue on GitHub — see How to File a Good Bug for tips on filing a great bug report
📝 Want to contribute? See our contributing guide
Citation#
If you find visualkeras helpful in your research, please cite it:
@misc{Gavrikov2020VisualKeras,
author = {Gavrikov, Paul and Patapati, Santosh},
title = {visualkeras},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/paulgavrikov/visualkeras}},
}
License#
visualkeras is licensed under the MIT License. See the LICENSE file for details.