我对如何"BatchNorm"
在模型中使用/插入层有点困惑。
我看到了几种不同的方法,例如:
ResNets:"BatchNorm"
+ "Scale"
(无参数共享)
"BatchNorm"
layer 紧随其后的是"Scale"
layer:
layer {
bottom: "res2a_branch1"
top: "res2a_branch1"
name: "bn2a_branch1"
type: "BatchNorm"
batch_norm_param {
use_global_stats: true
}
}
layer {
bottom: "res2a_branch1"
top: "res2a_branch1"
name: "scale2a_branch1"
type: "Scale"
scale_param {
bias_term: true
}
}
cifar10 示例:仅"BatchNorm"
在 caffe 提供的 cifar10 示例中,"BatchNorm"
使用时没有任何"Scale"
后续:
layer {
name: "bn1"
type: "BatchNorm"
bottom: "pool1"
top: "bn1"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
}
cifar10和_ batch_norm_param
_TRAIN
TEST
batch_norm_param: use_global_scale
TRAIN
在和TEST
阶段之间改变:
layer {
name: "bn1"
type: "BatchNorm"
bottom: "pool1"
top: "bn1"
batch_norm_param {
use_global_stats: false
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
include {
phase: TRAIN
}
}
layer {
name: "bn1"
type: "BatchNorm"
bottom: "pool1"
top: "bn1"
batch_norm_param {
use_global_stats: true
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
param {
lr_mult: 0
}
include {
phase: TEST
}
}
那么它应该是什么?
"BatchNorm"
应该如何在 caffe 中使用层?