sudo python /home/lu/caffe/python/draw_net.py /home/lu/caffe/examples/mnist/lenet_train_test.prototxt /home/lu/caffe/lenet.png --rankdir=BT

 

http://ethereon.github.io/netscope/#/editor

复制prototxt,shift+enter 即可 
caffe 可视化网络及resnet50结构

或者利用caffe/python 中的 draw_net.py。

python draw_net.py –rankdir TB /Users/eclipsycn/Documents/resnet-protofiles-master/ResNet_50_train_val.prototxt /Users/eclipsycn/Documents/resnet-protofiles-master/ResNet_50_train_val.jpg

–rankdir TB 是上下结构,其他结构LR之类可查。 
caffe 可视化网络及resnet50结构

可以看出Resnet50结构: 
conv1 + (1) 
3*res2*3(branch a-c) + (9) 
3*res3*4(branch a-d) + (12) 
3*res4*6(branch a-f) + (18) 
3*res5*3(branch a-c) + (9) 
fc (1) 
=50 
3 4 6 3 每一阶段第一个block 都会将输入接1*1conv后+输出,阶段剩下(3-1)、(4-1)、(6-1)、(3-1)个block按正常block处理。

相关文章: