caffe中本来提供了用以对net进行可视化的python接口,可以以流程图的方式对net进行展示。但怎奈又需要再次对python接口、环境进行调试,运行时也要再次编译pycaffe,实在是有些麻烦。后在网上几经寻找找到了一个可视化网站——Netscope。 只需要将prototxt文件当中的net定义拷贝至网页中即可得到可视化的模型。这里给出一个16层VGGnet模型示例。
name: "VGG_ILSVRC_16_layers"
input: "data"
input_dim: 1
input_dim: 3
#input_dim: 232
#input_dim: 232
input_dim: 280 #361 #368 # 380
input_dim: 280 #361 #368 # 380
#input_dim: 480
#input_dim: 480
layers {
bottom: "data"
top: "conv1_1"
name: "conv1_1"
type: CONVOLUTION
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv1_1"
top: "conv1_1"
name: "relu1_1"
type: RELU
}
layers {
bottom: "conv1_1"
top: "conv1_2"
name: "conv1_2"
type: CONVOLUTION
convolution_param {
num_output: 64
pad: 1
kernel_size: 3
}
}
layers {
bottom: "conv1_2"
top: "conv1_2"
name: "relu1_2"
type: RELU
}
layers {
bottom: "conv1_2"
top: "pool1"
name: "pool1"
type: POOLING
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layers