Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to visualize Caffe Net using GraphViz

📅 2016-Mar-10 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 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