From 506443845b89bd8812645f9f2f4525cfc785c897 Mon Sep 17 00:00:00 2001 From: Hugh Perkins Date: Tue, 2 Feb 2016 11:09:28 +0000 Subject: [PATCH] remove warning about data module --- loadcaffe.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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";