Caffe学习:使用pycaffe绘制网络结构
2017-08-11 11:12
537 查看
详见:/caffe/Python/draw_net.py
导入相关库
参数配置
读取网络
绘制网络
注:如果提示缺少pydot库的话,执行如下命令安装:
导入相关库
import caffe import caffe.draw from caffe.proto import caffe_pb2 from google.protobuf import text_format
参数配置
# 网络结构文件 input_net_proto_file = 'caffe_net.prototxt' # 输出图片文件 output_image_file = 'net_pic.jpg' # 网络结构排列方式:LR、TB、RL等 rankdir = 'LR'
读取网络
net = caffe_pb2.NetParameter() text_format.Merge(open(input_net_proto_file).read(), net)
绘制网络
print('Drawing net to %s' % output_image_file) caffe.draw.draw_net_to_file(net, output_image_file, rankdir) print('done...')
注:如果提示缺少pydot库的话,执行如下命令安装:
sudo apt-get install python-pydot
相关文章推荐
- Caffe学习:使用pycaffe绘制网络结构
- ubuntu14使用python绘制caffe的深度学习网络结构
- 【神经网络与深度学习】【python开发】caffe-windows使能python接口使用draw_net.py绘制网络结构图过程
- Caffe下python环境的编译和使用draw_net.py绘制lenet网络结构图
- Caffe学习:使用pycaffe定义网络
- Caffe学习:使用pycaffe绘制loss、accuracy曲线
- caffe学习笔记7-python接口绘制网络结构图
- caffe中使用draw_net.py绘制卷积神经网络结构图
- 【caffe学习笔记之5】Win10系统下Caffe的Python接口设置方法并绘制网络结构图
- caffe 使能python接口使用draw_net.py绘制网络结构图过程
- Caffe学习:使用pycaffe进行网络训练与测试
- 使用Pycaffe绘制Caffe网络图
- ubuntu上使用draw_net.py绘制caffe ssd网络结构
- caffe 使能python接口使用draw_net.py绘制网络结构图过程
- Windows下使用python绘制caffe中.prototxt网络结构数据可视化
- caffe使用draw_net.py网络结构绘制
- Caffe学习:使用pycaffe定义网络
- caffe入门学习(5):绘制网络结构图
- caffe-windows下使用pycaffe绘制网络图
- Caffe下使用draw_net.py绘制lenet网络结构图