зеркало из https://github.com/microsoft/caffe.git
added support for "k" LRN parameter to upgrade_proto
This commit is contained in:
Родитель
502141dd43
Коммит
aeb0e984a1
|
@ -716,6 +716,7 @@ message V0LayerParameter {
|
|||
optional uint32 local_size = 13 [default = 5]; // for local response norm
|
||||
optional float alpha = 14 [default = 1.]; // for local response norm
|
||||
optional float beta = 15 [default = 0.75]; // for local response norm
|
||||
optional float k = 22 [default = 1.];
|
||||
|
||||
// For data layers, specify the data source
|
||||
optional string source = 16;
|
||||
|
|
|
@ -285,6 +285,14 @@ bool UpgradeLayerParameter(const LayerParameter& v0_layer_connection,
|
|||
is_fully_compatible = false;
|
||||
}
|
||||
}
|
||||
if (v0_layer_param.has_k()) {
|
||||
if (type == "lrn") {
|
||||
layer_param->mutable_lrn_param()->set_k(v0_layer_param.k());
|
||||
} else {
|
||||
LOG(ERROR) << "Unknown parameter k for layer type " << type;
|
||||
is_fully_compatible = false;
|
||||
}
|
||||
}
|
||||
if (v0_layer_param.has_source()) {
|
||||
if (type == "data") {
|
||||
layer_param->mutable_data_param()->set_source(v0_layer_param.source());
|
||||
|
|
Загрузка…
Ссылка в новой задаче