卷积层的运算量公式
num(MAC)=I*J*M*N*K*L
I J 为卷积核大小
M N为卷积之后输出特征的大小
K表示输入通道个数
L表示输出通道个数(这里的通道数可以理解为单样本特征图的个数)
以lenet中的参数为示例:
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 20
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
&

本文介绍了卷积层的运算量计算公式:num(MAC)=I*J*M*N*K*L,其中I*J是卷积核大小,M*N是输出特征尺寸,K是输入通道数,L是输出通道数。以LeNet为例,说明了MAC的计算过程。同时,参数数量计算为para=I*J*K*L,即卷积核个数乘以卷积核尺寸。
最低0.47元/天 解锁文章
3537

被折叠的 条评论
为什么被折叠?



