"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
}
}
cifar10batch_norm_paramとTRAINで異なるTEST
batch_norm_param: use_global_scaleTRAINと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"カフェでレイヤーをどのように使用する必要がありますか?