| 24 | }; |
| 25 | |
| 26 | void Normalize::run(MNN::OpT* dstOp, const caffe::LayerParameter& parameters, const caffe::LayerParameter& weight) { |
| 27 | auto normizeT = new MNN::NormalizeT; |
| 28 | dstOp->main.value = normizeT; |
| 29 | auto& l = parameters.norm_param(); |
| 30 | normizeT->channelShared = l.channel_shared(); |
| 31 | normizeT->acrossSpatial = l.across_spatial(); |
| 32 | normizeT->eps = l.eps(); |
| 33 | auto& scaleBlob = weight.blobs(0); |
| 34 | for (int i = 0; i < scaleBlob.data_size(); ++i) { |
| 35 | normizeT->scale.push_back(scaleBlob.data(i)); |
| 36 | } |
| 37 | } |
| 38 | static OpConverterRegister<Normalize> a("Normalize"); |