From: Jeff Donahue Date: Fri, 6 Feb 2015 03:28:42 +0000 (-0800) Subject: fix for layer-type-str: loss_param and DECONVOLUTION type should have X-Git-Tag: submit/tizen/20180823.020014~572^2~35^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a226970c1b2b365a165e5a8bf9aea7606815414;p=platform%2Fupstream%2Fcaffeonacl.git fix for layer-type-str: loss_param and DECONVOLUTION type should have been included in V1LayerParameter, get upgraded --- diff --git a/src/caffe/proto/caffe.proto b/src/caffe/proto/caffe.proto index 81fd251..c2a39a5 100644 --- a/src/caffe/proto/caffe.proto +++ b/src/caffe/proto/caffe.proto @@ -719,6 +719,7 @@ message V1LayerParameter { CONTRASTIVE_LOSS = 37; CONVOLUTION = 4; DATA = 5; + DECONVOLUTION = 39; DROPOUT = 6; DUMMY_DATA = 32; EUCLIDEAN_LOSS = 7; @@ -790,6 +791,7 @@ message V1LayerParameter { optional ThresholdParameter threshold_param = 25; optional WindowDataParameter window_data_param = 20; optional TransformationParameter transform_param = 36; + optional LossParameter loss_param = 42; optional V0LayerParameter layer = 1; } diff --git a/src/caffe/util/upgrade_proto.cpp b/src/caffe/util/upgrade_proto.cpp index 258d7d3..38a0602 100644 --- a/src/caffe/util/upgrade_proto.cpp +++ b/src/caffe/util/upgrade_proto.cpp @@ -824,6 +824,10 @@ bool UpgradeV1LayerParameter(const V1LayerParameter& v1_layer_param, layer_param->mutable_transform_param()->CopyFrom( v1_layer_param.transform_param()); } + if (v1_layer_param.has_loss_param()) { + layer_param->mutable_loss_param()->CopyFrom( + v1_layer_param.loss_param()); + } if (v1_layer_param.has_layer()) { LOG(ERROR) << "Input NetParameter has V0 layer -- ignoring."; is_fully_compatible = false; @@ -849,6 +853,8 @@ const char* UpgradeV1LayerType(const V1LayerParameter_LayerType type) { return "ContrastiveLoss"; case V1LayerParameter_LayerType_CONVOLUTION: return "Convolution"; + case V1LayerParameter_LayerType_DECONVOLUTION: + return "Deconvolution"; case V1LayerParameter_LayerType_DATA: return "Data"; case V1LayerParameter_LayerType_DROPOUT: