语音学习笔记14------卷积神经网络CNN参数说明

本文详细介绍了Caffe框架中卷积神经网络(CNN)的各个层,包括卷积层、池化层、局部响应归一化层等,详细解析了它们的参数设置和作用,如卷积层的filter数量、kernel_size、pad、stride等,以及池化层的pooling方法和步长。此外,还提及了softmax、损失层、激励层、数据层和一般层的相关参数和功能。
摘要由CSDN通过智能技术生成

由于神经网络中有不同的层结构,不同类型的层又有不同的参数,所有就根据Caffe官网的说明文档做了一个简单的总结。


1. Vision Layers

1.1 卷积层(Convolution)

类型:CONVOLUTION

例子

layers {  name: "conv1"  type: CONVOLUTION  bottom: "data"  top: "conv1"  blobs_lr: 1          # learning rate multiplier for the filters  blobs_lr: 2          # learning rate multiplier for the biases  weight_decay: 1      # weight decay multiplier for the filters  weight_decay: 0      # weight decay multiplier for the biases  convolution_param {    num_output: 96     # learn 96 filters    kernel_size: 11    # each filter is 11x11    stride: 4          # step 4 pixels between each filter application    weight_filler {      type: "gaussian" # initialize the filters from a Gaussian      std: 0.01        # distribution with stdev 0.01 (default mean: 0)    }    bias_filler {      type: "constant" # initialize the biases to zero (0)      value: 0    }  }}


blobs_lr: 学习率调整的参数,在上面的例子中设置权重学习率和运行中求解器给出的学习率一样,同时是偏置学习率为权重的两倍。 

weight_decay

 

卷积层的重要参数

必须参数:

num_output (c_o):过滤器的个数

kernel_size (or kernel_h and kernel_w):过滤器的大小

 

可选参数:

weight_filler [default type: 'constant' value: 0]:参数的初始化方法

bias_filler:偏置的初始化方法

bias_term [default true]:指定是否是否开启偏置项

pad (or pad_h and pad_w) [default 0]:指定在输入的每一边加上多少个像素

stride (or stride_h and stride_w) [default 1]:指定过滤器的步长

group (g) [default 1]: If g > 1, we restrict the connectivityof each filter to a subset of the input. Specifically, the input and outputchannels are separated into g groups, and the ith output group channels will beonly connected to the ith input group channels.

 

通过卷积后的大小变化:

输入:n * c_i * h_i * w_i

输出:n * c_o * h_o * w_o,其中h_o = (h_i + 2 * pad_h - kernel_h) /stride_h + 1,w_o通过同样的方法计算。


1.2 池化层(Pooling)

类型:POOLING

例子

layers {  name: "pool1"  type: POOLING  bottom: "conv1"  top: "pool1"  pooling_param {    pool: MAX    kernel_size: 3 # pool over a 3x3 region    stride: 2      # step two pixels (in the bottom blob) between pooling regions  }}

卷积层的重要参数

必需参数:

kernel_size (or kernel_h and kernel_w):过滤器的大小

 

可选参数:

pool [default MAX]:pooling的方法,目前有MAX, AVE, 和STOCHASTIC三种方法

pad (or pad_h and pad_w) [default 0]:指定在输入的每一遍加上多少个像素

stride (or stride_h and stride_w) [default1]:指定过滤器的步长

 

通过池化后的大小变化:

输入:n * c_i * h_i * w_i

输出:n * c_o * h_o * w_o,其中h_o = (h_i + 2 * pad_h - kernel_h) /stride_h + 1,w_o通过同样的方法计算。


1.3 Local Response Normalization (LRN)

类型:LRN

Local ResponseNormalization是对一个局部的输入区域进行的归一化(激活a被加一个归一化权重(分母部分)生成了新的激活b),有两种不同的形式,一种的输入区域为相邻

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值