Add parseType

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-05-30 17:25:48 +02:00
parent f9d28c58ca
commit cb6dc4f182
2 changed files with 11 additions and 3 deletions
+10 -3
View File
@@ -9,9 +9,16 @@ namespace tk { namespace dnn {
tk::dnn::dataDim_t dim;
tk::dnn::Network *net = new tk::dnn::Network(dim);
}
std::string parseType(const std::string& line){
size_t start = line.find("[");
size_t end = line.find("]");
if( start == std::string::npos || end == std::string::npos)
return "";
start++;
std::string type = line.substr(start, end-start);
return type;
}
}}