process bn with phase

This commit is contained in:
zhaodezan 2020-08-21 08:31:10 -04:00
parent 65c343c8be
commit ad883e4384
1 changed files with 8 additions and 0 deletions

View File

@ -190,6 +190,14 @@ STATUS CaffeModelParser::ParseLayer(const caffe::NetParameter &proto,
continue; 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>(); std::unique_ptr<schema::CNodeT> op = std::make_unique<schema::CNodeT>();
op->name = layer.name(); op->name = layer.name();