Browse Source

!4943 process the bn with phase in prototxt

Merge pull request !4943 from zhaodezan/master
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
6a5c517d7b
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc

+ 8
- 0
mindspore/lite/tools/converter/parser/caffe/caffe_model_parser.cc View File

@@ -190,6 +190,14 @@ STATUS CaffeModelParser::ParseLayer(const caffe::NetParameter &proto,
continue;
}

// here we only process the bn with phase
if (layer.type() == "BatchNorm" && layer.include_size() == 1) {
if (layer.include(0).phase() == caffe::TRAIN) {
MS_LOG(INFO) << "Skip layer " << layer.name();
continue;
}
}

std::unique_ptr<schema::CNodeT> op = std::make_unique<schema::CNodeT>();
op->name = layer.name();



Loading…
Cancel
Save