1.安装GraphViz
sudo apt-get install graphviz
2 .安装pydot
sudo pip install pydot
3.示例:绘制full模型图片
python python/draw_net.py examples/cifar10/cifar10_full_train_test.prototxt netImage/cifar10_LR.png --rankdir=LR
draw_net.py执行的时候带三个参数
第一个参数:网络模型的prototxt文件
第二个参数:保存的图片路径及名字
第二个参数:--rankdir=x , x 有四种选项,分别是LR, RL, TB, BT 。用来表示网络的方向,分别是从左到右,从右到左,从上到小,从下到上。默认为LR.
LR
RL
TB
BT
文章参考:http://www.cnblogs.com/denny402/p/5106764.html