【Caffe】网络协议可视化分析工具

原创 2018年04月17日 16:33:38

Netscope CNN Analyzer:卷积神经网络结构基于web的可视化分析工具。只支持Caffe的prototxt格式。

以AlextNet为例:
AlextNet的网络结构如下:
name: "AlexNet" // 网络名称
layer {
  name: "data"
  type: "Data"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {    // 对数据进行预处理
    mirror: true    //是否做镜像
    crop_size: 227    
    mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
  }
  data_param {
    source: "examples/imagenet/ilsvrc12_train_lmdb"
    batch_size: 256
    backend: LMDB
  }
}
layer {
  name: "data"
  type: "Data"
  top: "data"
  top: "label"
  include {
    phase: TEST
  }
  transform_param {
    mirror: false
    crop_size: 227
    mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
  }
  data_param {
    source: "examples/imagenet/ilsvrc12_val_lmdb"
    batch_size: 50
    backend: LMDB
  }
}
layer {
  name: "conv1"
  type: "Convolution"
  bottom: "data"
  top: "conv1"
  param {
    lr_mult: 1            // 学习率
    decay_mult: 1        // 权值衰减
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 96         // 卷积核个数
    kernel_size: 11        // 卷积核大小
    stride: 4
    weight_filler {
      type: "gaussian"       // 权重初始化方法
      std: 0.01
    }
    bias_filler {
      type: "constant"        // 偏执项初始化
      value: 0
    }
  }
}
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}
layer {
  name: "norm1"
  type: "LRN"
  bottom: "conv1"
  top: "norm1"
  lrn_param {
    local_size: 5
    alpha: 0.0001
    beta: 0.75
  }
}
layer {
  name: "pool1"
  type: "Pooling"
  bottom: "norm1"
  top: "pool1"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "conv2"
  type: "Convolution"
  bottom: "pool1"
  top: "conv2"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 2
    kernel_size: 5
    group: 2        
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}
layer {
  name: "relu2"
  type: "ReLU"
  bottom: "conv2"
  top: "conv2"
}
layer {
  name: "norm2"
  type: "LRN"
  bottom: "conv2"
  top: "norm2"
  lrn_param {
    local_size: 5
    alpha: 0.0001
    beta: 0.75
  }
}
layer {
  name: "pool2"
  type: "Pooling"
  bottom: "norm2"
  top: "pool2"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "conv3"
  type: "Convolution"
  bottom: "pool2"
  top: "conv3"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 384
    pad: 1
    kernel_size: 3
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "relu3"
  type: "ReLU"
  bottom: "conv3"
  top: "conv3"
}
layer {
  name: "conv4"
  type: "Convolution"
  bottom: "conv3"
  top: "conv4"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 384
    pad: 1
    kernel_size: 3
    group: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}
layer {
  name: "relu4"
  type: "ReLU"
  bottom: "conv4"
  top: "conv4"
}
layer {
  name: "conv5"
  type: "Convolution"
  bottom: "conv4"
  top: "conv5"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  convolution_param {
    num_output: 256
    pad: 1
    kernel_size: 3
    group: 2
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}
layer {
  name: "relu5"
  type: "ReLU"
  bottom: "conv5"
  top: "conv5"
}
layer {
  name: "pool5"
  type: "Pooling"
  bottom: "conv5"
  top: "pool5"
  pooling_param {
    pool: MAX
    kernel_size: 3
    stride: 2
  }
}
layer {
  name: "fc6"
  type: "InnerProduct"
  bottom: "pool5"
  top: "fc6"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 4096
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}
layer {
  name: "relu6"
  type: "ReLU"
  bottom: "fc6"
  top: "fc6"
}
layer {
  name: "drop6"
  type: "Dropout"
  bottom: "fc6"
  top: "fc6"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc7"
  type: "InnerProduct"
  bottom: "fc6"
  top: "fc7"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 4096
    weight_filler {
      type: "gaussian"
      std: 0.005
    }
    bias_filler {
      type: "constant"
      value: 0.1
    }
  }
}
layer {
  name: "relu7"
  type: "ReLU"
  bottom: "fc7"
  top: "fc7"
}
layer {
  name: "drop7"
  type: "Dropout"
  bottom: "fc7"
  top: "fc7"
  dropout_param {
    dropout_ratio: 0.5
  }
}
layer {
  name: "fc8"
  type: "InnerProduct"
  bottom: "fc7"
  top: "fc8"
  param {
    lr_mult: 1
    decay_mult: 1
  }
  param {
    lr_mult: 2
    decay_mult: 0
  }
  inner_product_param {
    num_output: 1000
    weight_filler {
      type: "gaussian"
      std: 0.01
    }
    bias_filler {
      type: "constant"
      value: 0
    }
  }
}
layer {
  name: "accuracy"
  type: "Accuracy"
  bottom: "fc8"
  bottom: "label"
  top: "accuracy"
  include {
    phase: TEST
  }
}
layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "fc8"
  bottom: "label"
  top: "loss"
}

工具处理后的可视化流程图:
分析一:可以快速的分析网络层的拓扑结构:卷积层数量,激活函数方式,全连接数量,损失函数方式,以及层的通道数量。

放到对应的层下,可以看到实现层模块的具体参数设置。

分析二:参数量的统计。

[转]常用网络协议分析工具

1:TCPDUMP,老牌的分析工具,最先在linux平台使用,现在也可以用于windows平台。命令行方式,2000年以前参加工作者最喜爱的工具,缺点无法分析四层以上协议。常用于检测2-3层网络问题。...
  • wuhuiran
  • wuhuiran
  • 2007-07-31 13:19:00
  • 2682

\网络协议分析工具\网络协议分析工具

  • 2011年03月31日 09:12
  • 19.25MB
  • 下载

caffe深度学习网络(.prototxt)可视化工具

caffe深度学习网络(.prototxt)在线可视化工具:Netscope Editor 网址:http://ethereon.github.io/netscope/#/editor   ...
  • u012915263
  • u012915263
  • 2017-03-06 15:30:57
  • 7492

网络协议分析工具Ethereal的使用

大学时计算机网络课的实验报告,当时提不起兴趣,今天看来还挺有用的。可以学习下怎样抓数据包,然后分析程序的通信协议。 一:学习使用网络协议分析工具Ethereal的方法,并用它来分析一些协...
  • dc_726
  • dc_726
  • 2011-11-28 21:21:02
  • 3689

强烈推荐一个在线caffe网络可视化工具!!

简直想奔走相告!! 在线的caffe网络可视化工具: http://ethereon.github.io/netscope/quickstart.html 可以可视化写的网络结构,鼠标移上...
  • u011070171
  • u011070171
  • 2016-10-09 16:19:37
  • 6511

Caffe小玩意(1)-可视化网络结构

Caffe小玩意(1)-可视化网络结构\quad最近在学习Caffe,但是作为曾经的Windows深度用户,还是比较习惯可视化的界面。然而,Caffe当然是在Linux/OS X系统下更好啦,因为一般...
  • u014510375
  • u014510375
  • 2016-06-17 10:17:14
  • 4186

可视化caffe模型结构及在线可视化

假设Caffe的目录是$(CAFFE_ROOT) 1.编译caffe的python接口$ make pycaffe2.装各种依赖$ pip install pydot $ sudo apt-get ...
  • jiandanjinxin
  • jiandanjinxin
  • 2016-02-18 15:28:18
  • 2194

caffe学习笔记(5):层的特征可视化

本文对各层及由各层得到的结果进行了可视化处理。
  • qq_30401249
  • qq_30401249
  • 2016-05-21 10:22:41
  • 9298

可视化日志分析软件:Logstalgia

DDos和CC攻击是每个做运维都非常头疼的事情,需要快速定位攻击的url地址以及探测攻击规模。Logstalgia(也称ApachePong)便是这样的软件,Logstalgia通过分析Apache、...
  • Jif_L
  • Jif_L
  • 2014-04-27 22:38:33
  • 1254

caffemodel的卷积层可视化(Python接口)

模型文件为自己训练的caffenet_iter_720.caffemodel,模型配置文件为deploy.prototxt。使用jupyter notebook作为Python可视化工具 #首先...
  • qq_27923041
  • qq_27923041
  • 2017-06-06 16:48:07
  • 881
收藏助手
不良信息举报
您举报文章:【Caffe】网络协议可视化分析工具
举报原因:
原因补充:

(最多只允许输入30个字)