diff --git a/loadcaffe.cpp b/loadcaffe.cpp index cb61226..15d1592 100644 --- a/loadcaffe.cpp +++ b/loadcaffe.cpp @@ -106,6 +106,7 @@ void convertProtoToLuaV1(const caffe::NetParameter &netparam, const char* lua_na int num_output = netparam.input_dim_size(); for (int i=0; i> lines; auto& layer = netparam.layers(i); switch(layer.type()) @@ -324,6 +325,11 @@ void convertProtoToLuaV1(const caffe::NetParameter &netparam, const char* lua_na lines.emplace_back(layer.name(), "nn.SoftMax()"); break; } + case caffe::V1LayerParameter::DATA: + { + ignore = true; + break; + } default: { std::cout << "MODULE " << layer.name() << " UNDEFINED\n"; @@ -333,7 +339,7 @@ void convertProtoToLuaV1(const caffe::NetParameter &netparam, const char* lua_na if(!lines.empty()) for(auto& it: lines) ofs << "table.insert(model, {'" << it.first << "', " << it.second << "})\n"; - else + else if(!ignore) { ofs << "-- warning: module '" << layer.name() << " [type " << layer.type() << "]" << "' not found\n"; std::cout << "warning: module '" << layer.name() << " [type " << layer.type() << "]" << "' not found\n";