一个预测层的网络结构如下所示:

可以看到,是由三个分支组成的,分别是"PriorBox"层,以及conf、loc的预测层,其中,conf与loc的预测层的参数是由PriorBox的参数计算得到的,具体计算公式如下:

min_size与max_size分别对应一个尺度的预测框(有几个就对应几个预测框),in_size只管自己的预测,而max_size是与aspect_ratio联系在一起的;

filp参数是对应aspect_ratio的预测框*2,以几个max_size,再乘以几;最终得到结果为A

conf、loc的参数是在A的基础上再乘以类别数(加背景),以及4

如下,是需要预测两类的其中一个尺度的网络参数;

如上算出的是,每个格子需要预测的conf以及loc的个数;

每个预测层有H*W个格子,因此,总共预测的loc以及conf的个数是需要乘以H*W的;

如下是某一个层的例子(转自:http://www.360doc.com/content/17/1013/16/42392246_694639090.shtml)

注意最后这里的num_priorbox的值与前面的并不一样,这里是每个预测层所有的输出框的个数:

layer {
name: "combined_2_EltwisePROD_relu"
type: "ReLU"
bottom: "combined_2_EltwisePROD"
top: "combined_2_EltwisePROD_relu"
}
###########################################
################################################################### layer {
name: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
type: "Convolution"
bottom: "combined_2_EltwisePROD_relu"
top: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
convolution_param {
num_output:
bias_term: false
pad:
kernel_size:
stride:
weight_filler {
type: "gaussian"
std: 0.01
}
}
}
layer {
name: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter_bn"
type: "BatchNorm"
bottom: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
batch_norm_param {
moving_average_fraction: 0.999
eps: 0.001
}
}
layer {
name: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter_scale"
type: "Scale"
bottom: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
scale_param {
filler {
type: "constant"
value: 1.0
}
bias_term: true
bias_filler {
type: "constant"
value: 0.0
}
}
} layer {
name: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
type: "Convolution"
bottom: "combined_2_EltwisePROD_relu"
top: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
convolution_param {
num_output:
bias_term: false
pad:
kernel_size:
stride:
weight_filler {
type: "gaussian"
std: 0.01
}
}
}
layer {
name: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter_bn"
type: "BatchNorm"
bottom: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
batch_norm_param {
moving_average_fraction: 0.999
eps: 0.001
}
}
layer {
name: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter_scale"
type: "Scale"
bottom: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
scale_param {
filler {
type: "constant"
value: 1.0
}
bias_term: true
bias_filler {
type: "constant"
value: 0.0
}
}
} layer {
name: "combined_2_EltwisePROD_relu_mbox_loc"
type: "Convolution"
bottom: "rescombined_2_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "combined_2_EltwisePROD_relu_mbox_loc"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
convolution_param {
engine: CAFFE
num_output:
pad:
kernel_size:
stride:
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value:
}
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_loc_perm"
type: "Permute"
bottom: "combined_2_EltwisePROD_relu_mbox_loc"
top: "combined_2_EltwisePROD_relu_mbox_loc_perm"
permute_param {
order:
order:
order:
order:
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_loc_flat"
type: "Flatten"
bottom: "combined_2_EltwisePROD_relu_mbox_loc_perm"
top: "combined_2_EltwisePROD_relu_mbox_loc_flat"
flatten_param {
axis:
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_conf_new"
type: "Convolution"
bottom: "rescombined_2i_EltwisePROD_relu_inter256_mbox_locnew_inter"
top: "combined_2_EltwisePROD_relu_mbox_conf_new"
param {
lr_mult:
decay_mult:
}
param {
lr_mult:
decay_mult:
}
convolution_param {
engine: CAFFE
num_output:
pad:
kernel_size:
stride:
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value:
}
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_conf_new_perm"
type: "Permute"
bottom: "combined_2_EltwisePROD_relu_mbox_conf_new"
top: "combined_2_EltwisePROD_relu_mbox_conf_new_perm"
permute_param {
order:
order:
order:
order:
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_conf_new_flat"
type: "Flatten"
bottom: "combined_2_EltwisePROD_relu_mbox_conf_new_perm"
top: "combined_2_EltwisePROD_relu_mbox_conf_new_flat"
flatten_param {
axis:
}
}
layer {
name: "combined_2_EltwisePROD_relu_mbox_priorbox"
type: "PriorBox"
bottom: "combined_2_EltwisePROD_relu"
bottom: "data"
top: "combined_2_EltwisePROD_relu_mbox_priorbox"
prior_box_param {
min_size: 12.0
min_size: 6.0
max_size: 30.0
max_size: 20.0
aspect_ratio:
aspect_ratio: 2.5
aspect_ratio:
flip: true
clip: false
variance: 0.1
variance: 0.1
variance: 0.2
variance: 0.2
step:
offset: 0.5
}
}

SSD训练网络参数计算的更多相关文章

  1. LeNet-5网络结构及训练参数计算

    经典神经网络诞生记: 1.LeNet,1998年 2.AlexNet,2012年 3.ZF-net,2013年 4.GoogleNet,2014年 5.VGG,2014年 6.ResNet,201 ...

  2. 『计算机视觉』Mask-RCNN_训练网络其二:train网络结构&损失函数

    Github地址:Mask_RCNN 『计算机视觉』Mask-RCNN_论文学习 『计算机视觉』Mask-RCNN_项目文档翻译 『计算机视觉』Mask-RCNN_推断网络其一:总览 『计算机视觉』M ...

  3. CNN网络参数

    卷积神经网络 LeNet-5各层参数详解 LeNet论文阅读:LeNet结构以及参数个数计算     LeNet-5共有7层,不包含输入,每层都包含可训练参数:每个层有多个Feature Map,每个 ...

  4. pytorch和tensorflow的爱恨情仇之定义可训练的参数

    pytorch和tensorflow的爱恨情仇之基本数据类型 pytorch和tensorflow的爱恨情仇之张量 pytorch版本:1.6.0 tensorflow版本:1.15.0 之前我们就已 ...

  5. 『计算机视觉』Mask-RCNN_训练网络其三:训练Model

    Github地址:Mask_RCNN 『计算机视觉』Mask-RCNN_论文学习 『计算机视觉』Mask-RCNN_项目文档翻译 『计算机视觉』Mask-RCNN_推断网络其一:总览 『计算机视觉』M ...

  6. 『计算机视觉』Mask-RCNN_训练网络其一:数据集与Dataset类

    Github地址:Mask_RCNN 『计算机视觉』Mask-RCNN_论文学习 『计算机视觉』Mask-RCNN_项目文档翻译 『计算机视觉』Mask-RCNN_推断网络其一:总览 『计算机视觉』M ...

  7. 卷积神经网络(CNN)张量(图像)的尺寸和参数计算(深度学习)

    分享一些公式计算张量(图像)的尺寸,以及卷积神经网络(CNN)中层参数的计算. 以AlexNet网络为例,以下是该网络的参数结构图. AlexNet网络的层结构如下: 1.Input:       图 ...

  8. 关于LeNet-5卷积神经网络 S2层与C3层连接的参数计算的思考???

    https://blog.csdn.net/saw009/article/details/80590245 关于LeNet-5卷积神经网络 S2层与C3层连接的参数计算的思考??? 首先图1是LeNe ...

  9. caffe 网络参数设置

    weight_decay防止过拟合的参数,使用方式: 样本越多,该值越小 模型参数越多,该值越大 一般建议值: weight_decay: 0.0005 lr_mult, decay_mult 关于偏 ...

随机推荐

  1. Qt网络获取本机网络信息

    下面我们就讲解如何获取自己电脑的IP地址以及其他网络信息.这一节中,我们会涉及到网络模块(QtNetwork Module)中的QHostInfo ,QHostAddress ,QNetworkInt ...

  2. Video Captioning 综述

    1.Unsupervised learning of video representations using LSTMs 方法:从先前的帧编码预测未来帧序列 相似于Sequence to sequen ...

  3. Elasticsearch 部署以及报错解决

    前言 Elasticsearch 是一个非常值得学习和使用的分布式存储 此次部署将采用 centos6.9 一.初步了解 ES 简谈概念 Elasticsearch 是一个开源的高扩展的分布式全文检索 ...

  4. 前端知识点回顾之重点篇——AJAX

    Ajax(Asynchronous JavaScript and XML) 这种技术就是无须刷新页面即可从服务器中取得数据,但不一定是XML数据.在原生方法上,Ajax技术的核心是XMLHttpReq ...

  5. SpringCloud(1)----基于RestTemplate微服务项目

    在写SpringCloud搭建微服务之前,我想先搭建一个不通过springcloud只通过SpringBoot和Mybatis进行模块之间额通讯.然后在此基础上再添加SpringCloud框架. 下面 ...

  6. Nginx优化之服务性能优化

    优化Nginx服务的worker进程个数 修改nginx主配置文件 worker_processes 1; #指定了Nginx要开启的进程数,结尾数字就是进程个数 Nginx有Master进程和wor ...

  7. vue active样式显示

    html:代码 <ul> <li @click="current='xxxx'" :class="{active:current=='xxxx'}&qu ...

  8. [Java复习] 集合框架 Collection

    Q1 Collection java的集合以及集合之间的继承关系? 数组和链表的区别? 固定长度,连续内存,不能扩展,随机访问快,插入删除慢.链表相反 List, Set, Map的区别? List, ...

  9. Java端使用Batik将SVG转为PNG

    在上篇中,我们需要将Highcharts生成的图通过后台保存到pdf文件中,就需要对SVG进行转换. 这里就介绍一下使用Batik处理SVG代码的方法. 首先是jar包的获取地址,https://xm ...

  10. Maven 官网 查找&下载 jar包& pom引用 完美方案

    Maven 官网 查找&下载 jar包 & pom引用 问题描述 在我们在开发过程中,经常遇到程序中需要引用的某个版本jar包,但是在公司的私有仓库下载不到的情况. 遇到这种情况,该怎 ...