Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to visualize Caffe Net using GraphViz

📅 2016-Mar-10 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ caffe, dot, graphviz, protobuf, xdot ⬩ 📚 Archive

The network architecture of Convolutional Neural Networks (CNN) can be heavily layered and complex. Viewing the network visually is a great way to get a sense of its architecture. Since the network is a graph, it is easy to visualize this using GraphViz.

Caffe requires its Net to be in the Google ProtoBuf format. It also provides a script that can be used to output the graph to all the formats supported by GraphViz.

$ python/ foo.prototxt foo.png

Possible output formats include PNG, PDF, DOT and others supported by GraphViz.

$ python/ --rankdir TB foo.prototxt foo.png
$ python/ foo.prototxt
$ xdot

Tried with: Ubuntu 14.04

© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email